8000 Added a test with 3 strings · rprand/ArduinoJson@04f5273 · GitHub
[go: up one dir, main page]

Skip to content

Commit 04f5273

Browse files
committed
Added a test with 3 strings
1 parent c06f426 commit 04f5273

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

JsonParserTests/JsonArrayIteratorTests.cpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,21 @@ namespace JsonParserTests
4343
Assert::AreEqual(expected[index++], i);
4444
}
4545
}
46+
47+
TEST_METHOD(ThreeStrings)
48+
{
49+
char json[] = "[\"1\",\"2\",\"3\"]";
50+
char* expected[] = { "1", "2", "3" };
51+
JsonParser<4> parser;
52+
53+
JsonArray a = parser.parse(json);
54+
55+
int index = 0;
56+
57+
for (const char* i : a)
58+
{
59+
Assert::AreEqual(expected[index++], i);
60+
}
61+
}
4662
};
4763
}

0 commit comments

Comments
 (0)
0