Added a test with 3 strings

This commit is contained in:
Benoit Blanchon
2014-07-19 16:15:57 +02:00
parent c06f42659a
commit 04f52733c2

View File

@ -43,5 +43,21 @@ namespace JsonParserTests
Assert::AreEqual(expected[index++], i);
}
}
TEST_METHOD(ThreeStrings)
{
char json[] = "[\"1\",\"2\",\"3\"]";
char* expected[] = { "1", "2", "3" };
JsonParser<4> parser;
JsonArray a = parser.parse(json);
int index = 0;
for (const char* i : a)
{
Assert::AreEqual(expected[index++], i);
}
}
};
}