Fixed JsonArrayIterator unit test

This commit is contained in:
Benoit Blanchon committed 2014-07-18 16:11:21 +02:00
1 parent 714a37bd59
commit 5d2ffc49fd
2 files changed
+26 -35

No files matched your search

+5 -5
View File
@@ -14,16 +14,16 @@ namespace JsonParserTests
TEST_METHOD(ThreeIntegers)
{
char json [] = "[1,2,3]";
long expected [] = { 1, 2, 3 };
JsonParser<4> parser;
JsonArray a = parser.parse(json);
long expected = 1;
for (auto i : a)
int index = 0;
for (long i : a)
{
Assert::AreEqual(expected, (long)*i);
expected++;
Assert::AreEqual(expected[index++], i);
}
}