forked from bblanchon/ArduinoJson
Added a test of a nested hash table in an array
This commit is contained in:
@ -1,5 +1,6 @@
|
|||||||
#include "CppUnitTest.h"
|
#include "CppUnitTest.h"
|
||||||
#include "JsonArray.h"
|
#include "JsonArray.h"
|
||||||
|
#include "JsonHashTable.h"
|
||||||
|
|
||||||
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
|
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
|
||||||
|
|
||||||
@ -109,6 +110,15 @@ namespace JsonGeneratorTests
|
|||||||
jsonIs("[[]]");
|
jsonIs("[[]]");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_METHOD(AddOneEmptyNestedHash)
|
||||||
|
{
|
||||||
|
JsonHashTable<1> nestedHash;
|
||||||
|
|
||||||
|
addNested(nestedHash);
|
||||||
|
|
||||||
|
jsonIs("[{}]");
|
||||||
|
}
|
||||||
|
|
||||||
TEST_METHOD(AddOneNestedArrayWithOneItem)
|
TEST_METHOD(AddOneNestedArrayWithOneItem)
|
||||||
{
|
{
|
||||||
JsonArray<1> nestedArray;
|
JsonArray<1> nestedArray;
|
||||||
|
Reference in New Issue
Block a user