Added JsonArrayIterator (tests are failing)

This commit is contained in:
Benoît Blanchon
2014-07-17 13:58:30 +02:00
parent ca01ecfb49
commit c329572d24
6 changed files with 109 additions and 1 deletions

View File

@ -0,0 +1,31 @@
#include "CppUnitTest.h"
#include "JsonParser.h"
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
using namespace ArduinoJson::Parser;
namespace JsonParserTests
{
TEST_CLASS(JsonArrayIteratorTests)
{
public:
TEST_METHOD(TestMethod1)
{
char json [] = "[1,2,3]";
JsonParser<4> parser;
JsonArray a = parser.parse(json);
long expected = 1;
for (auto i : a)
{
Assert::AreEqual(expected, (long)*i);
expected++;
}
}
};
}