mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-18 04:52:22 +02:00
Added a test of an empty hash table in a hash table
This commit is contained in:
@ -66,7 +66,7 @@ namespace JsonGeneratorTests
|
|||||||
jsonIs("{\"key\":false}");
|
jsonIs("{\"key\":false}");
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_METHOD(AddOneEmptyNestedArray)
|
TEST_METHOD(OneEmptyNestedArray)
|
||||||
{
|
{
|
||||||
JsonArray<1> nestedArray;
|
JsonArray<1> nestedArray;
|
||||||
|
|
||||||
@ -75,6 +75,15 @@ namespace JsonGeneratorTests
|
|||||||
jsonIs("{\"key\":[]}");
|
jsonIs("{\"key\":[]}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_METHOD(OneEmptyNestedHash)
|
||||||
|
{
|
||||||
|
JsonHashTable<1> nestedHash;
|
||||||
|
|
||||||
|
addNested("key", nestedHash);
|
||||||
|
|
||||||
|
jsonIs("{\"key\":{}}");
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
void addNested(const char* key, JsonObjectBase& value)
|
void addNested(const char* key, JsonObjectBase& value)
|
||||||
|
Reference in New Issue
Block a user