Просмотр исходного кода

Replace single quotes by double quotes

Benoit Blanchon 11 лет назад
Родитель
Сommit
d306422ed9
2 измененных файлов с 4 добавлено и 4 удалено
  1. 1 1
      JsonGeneratorTests/JsonArray.h
  2. 3 3
      JsonGeneratorTests/JsonArrayTests.cpp

+ 1 - 1
JsonGeneratorTests/JsonArray.h

@@ -82,7 +82,7 @@ public:
             {
             case JSON_STRING:
                 if (value.string)
-                    append(buffer, bufferSize, "'%s'", value.string);
+                    append(buffer, bufferSize, "\"%s\"", value.string);
                 else
                     append(buffer, bufferSize, "null");
                 break;

+ 3 - 3
JsonGeneratorTests/JsonArrayTests.cpp

@@ -27,7 +27,7 @@ namespace JsonGeneratorTests
         {
             arr.add("hello");
 
-            AssertJsonIs("['hello']");
+            AssertJsonIs("[\"hello\"]");
         }
 
         TEST_METHOD(AddTwoStrings)
@@ -35,7 +35,7 @@ namespace JsonGeneratorTests
             arr.add("hello");
             arr.add("world");
 
-            AssertJsonIs("['hello','world']");
+            AssertJsonIs("[\"hello\",\"world\"]");
         }
 
         TEST_METHOD(AddOneStringOverCapacity)
@@ -44,7 +44,7 @@ namespace JsonGeneratorTests
             arr.add("world");
             arr.add("lost");
 
-            AssertJsonIs("['hello','world']");
+            AssertJsonIs("[\"hello\",\"world\"]");
         }
 
         TEST_METHOD(AddOneNumber)