Generator: added a test of an array with 2 strings

This commit is contained in:
Benoît Blanchon
2014-06-24 13:36:40 +02:00
parent f18f554c2f
commit df25a21050
2 changed files with 13 additions and 2 deletions

View File

@ -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];