Renamed ARDUINO_JSON_NO_DEPRECATED_WARNING into ARDUINO_JSON_NO_DEPRECATION_WARNING

This commit is contained in:
Benoit Blanchon
2014-07-22 20:33:17 +02:00
parent 649f292ea7
commit abef85218e
8 changed files with 105 additions and 104 deletions

View File

@ -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);
}
}
};
};
}