Commit a0a6d737 authored by miloyip's avatar miloyip

Fix gcc compilation

parent 752afa7b
...@@ -31,7 +31,8 @@ TEST(PrettyWriter, Basic) { ...@@ -31,7 +31,8 @@ TEST(PrettyWriter, Basic) {
StringBuffer buffer; StringBuffer buffer;
PrettyWriter<StringBuffer> writer(buffer); PrettyWriter<StringBuffer> writer(buffer);
Reader reader; Reader reader;
reader.Parse(StringStream(kJson), writer); StringStream s(kJson);
reader.Parse(s, writer);
EXPECT_STREQ( EXPECT_STREQ(
"{\n" "{\n"
" \"hello\": \"world\",\n" " \"hello\": \"world\",\n"
...@@ -54,7 +55,8 @@ TEST(PrettyWriter, SetIndent) { ...@@ -54,7 +55,8 @@ TEST(PrettyWriter, SetIndent) {
PrettyWriter<StringBuffer> writer(buffer); PrettyWriter<StringBuffer> writer(buffer);
writer.SetIndent('\t', 1); writer.SetIndent('\t', 1);
Reader reader; Reader reader;
reader.Parse(StringStream(kJson), writer); StringStream s(kJson);
reader.Parse(s, writer);
EXPECT_STREQ( EXPECT_STREQ(
"{\n" "{\n"
"\t\"hello\": \"world\",\n" "\t\"hello\": \"world\",\n"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment