Skip to content

Commit

Permalink
Replace StringReplace with StrReplaceAll because the fix absl version…
Browse files Browse the repository at this point in the history
… we're using doesn't have it yet.

PiperOrigin-RevId: 310429819
Change-Id: I4d08a65c88354a236236994d97ee52ec68c823e7
  • Loading branch information
DeepMind Technologies Ltd authored and open_spiel@google.com committed May 11, 2020
1 parent 9c4707c commit cfb9a28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions open_spiel/games/bridge_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void SerializeDoubleDummyResults() {
state->ApplyAction(action);
}
auto str = state->Serialize();
str = StringReplace(str, "\n", ",", true); // Makes the test easier to read
str = absl::StrReplaceAll(str, {{"\n", ","}});
SPIEL_CHECK_EQ(str,
"33,25,3,44,47,28,23,46,1,43,30,26,29,48,"
"24,42,13,21,17,8,5,34,6,7,37,49,11,38,51,"
Expand All @@ -75,7 +75,7 @@ void DeserializeDoubleDummyResults() {
"18,27,31,41,40,4,36,19,2,52,59,52,61,"
"Double Dummy Results,"
"12,12,0,12,7,5,7,5,9,12,0,12,6,5,8,5,3,7,0,7,";
serialized = StringReplace(serialized, ",", "\n", true);
serialized = absl::StrReplaceAll(serialized, {{",", "\n"}});
auto new_state = game->DeserializeState(serialized);
SPIEL_CHECK_EQ(serialized, new_state->Serialize());
}
Expand Down

0 comments on commit cfb9a28

Please sign in to comment.