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

Added a test that adds a nested array to an array

Benoît Blanchon 11 лет назад
Родитель
Сommit
aa6cf308db
1 измененных файлов с 10 добавлено и 0 удалено
  1. 10 0
      JsonGeneratorTests/JsonArrayTests.cpp

+ 10 - 0
JsonGeneratorTests/JsonArrayTests.cpp

@@ -111,6 +111,16 @@ namespace JsonGeneratorTests
             AssertJsonIs("[[]]");
         }
 
+        TEST_METHOD(AddOneNestedArrayWithOneItem)
+        {
+            JsonArray<1> nestedArray;
+            nestedArray.add(3.14);
+
+            arr.add(nestedArray);
+
+            AssertJsonIs("[[3.14]]");
+        }
+
         void AssertJsonIs(const char* expected)
         {      
             char buffer[256];