mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-18 21:12:25 +02:00
Changed JsonArray tests to show the issue
This commit is contained in:
@ -124,13 +124,19 @@ namespace JsonGeneratorTests
|
||||
|
||||
TEST_METHOD(OneEmptyNestedArray)
|
||||
{
|
||||
addNested(JsonArray<1>());
|
||||
JsonArray<1> nestedArray;
|
||||
|
||||
arr.add(nestedArray);
|
||||
|
||||
outputMustBe("[[]]");
|
||||
}
|
||||
|
||||
TEST_METHOD(OneEmptyNestedHash)
|
||||
{
|
||||
addNested(JsonHashTable<1>());
|
||||
JsonObject<1> nestedObject;
|
||||
|
||||
arr.add(nestedObject);
|
||||
|
||||
outputMustBe("[{}]");
|
||||
}
|
||||
|
||||
@ -139,18 +145,13 @@ namespace JsonGeneratorTests
|
||||
JsonArray<1> nestedArray;
|
||||
nestedArray.add(1);
|
||||
|
||||
addNested(nestedArray);
|
||||
arr.add(nestedArray);
|
||||
|
||||
outputMustBe("[[1]]");
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
void addNested(Printable& value)
|
||||
{
|
||||
arr.add<Printable&>(value);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void add(T value)
|
||||
{
|
||||
|
Reference in New Issue
Block a user