mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-17 04:22:18 +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}");
|
||||
}
|
||||
|
||||
TEST_METHOD(AddOneEmptyNestedArray)
|
||||
TEST_METHOD(OneEmptyNestedArray)
|
||||
{
|
||||
JsonArray<1> nestedArray;
|
||||
|
||||
@ -75,6 +75,15 @@ namespace JsonGeneratorTests
|
||||
jsonIs("{\"key\":[]}");
|
||||
}
|
||||
|
||||
TEST_METHOD(OneEmptyNestedHash)
|
||||
{
|
||||
JsonHashTable<1> nestedHash;
|
||||
|
||||
addNested("key", nestedHash);
|
||||
|
||||
jsonIs("{\"key\":{}}");
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
void addNested(const char* key, JsonObjectBase& value)
|
||||
|
Reference in New Issue
Block a user