forked from bblanchon/ArduinoJson
Renamed ARDUINO_JSON_NO_DEPRECATED_WARNING into ARDUINO_JSON_NO_DEPRECATION_WARNING
This commit is contained in:
@ -1,15 +1,19 @@
|
||||
/*
|
||||
* Arduino JSON library
|
||||
* Benoit Blanchon 2014 - MIT License
|
||||
*/
|
||||
|
||||
#include "CppUnitTest.h"
|
||||
#include "JsonParser.h"
|
||||
|
||||
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
|
||||
using namespace ArduinoJson::Parser;
|
||||
|
||||
|
||||
namespace JsonParserTests
|
||||
{
|
||||
TEST_CLASS(JsonArrayIteratorTests)
|
||||
{
|
||||
public:
|
||||
TEST_CLASS(JsonArrayIteratorTests)
|
||||
{
|
||||
public:
|
||||
|
||||
TEST_METHOD(EmptyJson)
|
||||
{
|
||||
@ -27,11 +31,11 @@ namespace JsonParserTests
|
||||
|
||||
Assert::AreEqual(0, loopCount);
|
||||
}
|
||||
|
||||
TEST_METHOD(ThreeIntegers)
|
||||
{
|
||||
|
||||
TEST_METHOD(ThreeIntegers)
|
||||
{
|
||||
char json [] = "[1,2,3]";
|
||||
long expected [] = { 1, 2, 3 };
|
||||
long expected [] = {1, 2, 3};
|
||||
JsonParser<4> parser;
|
||||
|
||||
JsonArray a = parser.parse(json);
|
||||
@ -42,12 +46,12 @@ namespace JsonParserTests
|
||||
{
|
||||
Assert::AreEqual(expected[index++], i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TEST_METHOD(ThreeStrings)
|
||||
{
|
||||
char json[] = "[\"1\",\"2\",\"3\"]";
|
||||
char* expected[] = { "1", "2", "3" };
|
||||
char* expected[] = {"1", "2", "3"};
|
||||
JsonParser<4> parser;
|
||||
|
||||
JsonArray a = parser.parse(json);
|
||||
@ -59,5 +63,5 @@ namespace JsonParserTests
|
||||
Assert::AreEqual(expected[index++], i);
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user