mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-17 12:32:17 +02:00
Generator: added a test of an array with 2 strings
This commit is contained in:
@ -7,7 +7,7 @@ namespace JsonGeneratorTests
|
||||
{
|
||||
TEST_CLASS(JsonArrayTests)
|
||||
{
|
||||
JsonArray<32> arr;
|
||||
JsonArray<3> arr;
|
||||
|
||||
public:
|
||||
|
||||
@ -23,6 +23,14 @@ namespace JsonGeneratorTests
|
||||
AssertJsonIs("['hello']");
|
||||
}
|
||||
|
||||
TEST_METHOD(TwoStrings)
|
||||
{
|
||||
arr.add("hello");
|
||||
arr.add("world");
|
||||
|
||||
AssertJsonIs("['hello','world']");
|
||||
}
|
||||
|
||||
void AssertJsonIs(const char* expected)
|
||||
{
|
||||
char buffer[256];
|
||||
|
Reference in New Issue
Block a user