forked from bblanchon/ArduinoJson
Added a header to simplify library usage
This commit is contained in:
@ -5,13 +5,9 @@
|
||||
// https://github.com/bblanchon/ArduinoJson
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <ArduinoJson/StaticJsonBuffer.hpp>
|
||||
#include <ArduinoJson/JsonArray.hpp>
|
||||
#include <ArduinoJson/JsonObject.hpp>
|
||||
#include <ArduinoJson.h>
|
||||
#include "Printers.hpp"
|
||||
|
||||
using namespace ArduinoJson;
|
||||
|
||||
class GbathreeBug : public testing::Test {
|
||||
public:
|
||||
GbathreeBug() : object(buffer.parseObject(getJson())) {}
|
||||
|
@ -5,11 +5,7 @@
|
||||
// https://github.com/bblanchon/ArduinoJson
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <ArduinoJson/StaticJsonBuffer.hpp>
|
||||
#include <ArduinoJson/JsonArray.hpp>
|
||||
#include <ArduinoJson/JsonObject.hpp>
|
||||
|
||||
using namespace ArduinoJson;
|
||||
#include <ArduinoJson.h>
|
||||
|
||||
class IntegrationTests : public testing::TestWithParam<const char*> {
|
||||
static const size_t MAX_JSON_SIZE = 10000;
|
||||
|
@ -5,11 +5,7 @@
|
||||
// https://github.com/bblanchon/ArduinoJson
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <ArduinoJson/JsonArray.hpp>
|
||||
#include <ArduinoJson/JsonObject.hpp>
|
||||
#include <ArduinoJson/StaticJsonBuffer.hpp>
|
||||
|
||||
using namespace ArduinoJson;
|
||||
#include <ArduinoJson.h>
|
||||
|
||||
struct Person {
|
||||
int id;
|
||||
|
@ -5,11 +5,7 @@
|
||||
// https://github.com/bblanchon/ArduinoJson
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <ArduinoJson/StaticJsonBuffer.hpp>
|
||||
#include <ArduinoJson/JsonArray.hpp>
|
||||
#include <ArduinoJson/JsonObject.hpp>
|
||||
|
||||
using namespace ArduinoJson;
|
||||
#include <ArduinoJson.h>
|
||||
|
||||
class JsonArray_Container_Tests : public ::testing::Test {
|
||||
protected:
|
||||
|
@ -5,10 +5,7 @@
|
||||
// https://github.com/bblanchon/ArduinoJson
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <ArduinoJson/JsonArray.hpp>
|
||||
#include <ArduinoJson/StaticJsonBuffer.hpp>
|
||||
|
||||
using namespace ArduinoJson;
|
||||
#include <ArduinoJson.h>
|
||||
|
||||
TEST(JsonArray_Iterator_Test, SimpleTest) {
|
||||
StaticJsonBuffer<100> jsonBuffer;
|
||||
|
@ -5,11 +5,7 @@
|
||||
// https://github.com/bblanchon/ArduinoJson
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <ArduinoJson/JsonArray.hpp>
|
||||
#include <ArduinoJson/JsonObject.hpp>
|
||||
#include <ArduinoJson/StaticJsonBuffer.hpp>
|
||||
|
||||
using namespace ArduinoJson;
|
||||
#include <ArduinoJson.h>
|
||||
|
||||
class JsonArray_PrettyPrintTo_Tests : public testing::Test {
|
||||
public:
|
||||
|
@ -5,11 +5,7 @@
|
||||
// https://github.com/bblanchon/ArduinoJson
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <ArduinoJson/JsonArray.hpp>
|
||||
#include <ArduinoJson/JsonObject.hpp>
|
||||
#include <ArduinoJson/StaticJsonBuffer.hpp>
|
||||
|
||||
using namespace ArduinoJson;
|
||||
#include <ArduinoJson.h>
|
||||
|
||||
class JsonArray_PrintTo_Tests : public testing::Test {
|
||||
public:
|
||||
|
@ -5,11 +5,7 @@
|
||||
// https://github.com/bblanchon/ArduinoJson
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <ArduinoJson/JsonArray.hpp>
|
||||
#include <ArduinoJson/JsonObject.hpp>
|
||||
#include <ArduinoJson/StaticJsonBuffer.hpp>
|
||||
|
||||
using namespace ArduinoJson;
|
||||
#include <ArduinoJson.h>
|
||||
|
||||
class JsonObject_Container_Tests : public ::testing::Test {
|
||||
public:
|
||||
|
@ -5,12 +5,9 @@
|
||||
// https://github.com/bblanchon/ArduinoJson
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <ArduinoJson/JsonObject.hpp>
|
||||
#include <ArduinoJson/StaticJsonBuffer.hpp>
|
||||
#include <ArduinoJson.h>
|
||||
#include "Printers.hpp"
|
||||
|
||||
using namespace ArduinoJson;
|
||||
|
||||
class JsonObject_Iterator_Test : public testing::Test {
|
||||
public:
|
||||
JsonObject_Iterator_Test() : object(_buffer.createObject()) {
|
||||
|
@ -5,11 +5,7 @@
|
||||
// https://github.com/bblanchon/ArduinoJson
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <ArduinoJson/JsonArray.hpp>
|
||||
#include <ArduinoJson/JsonObject.hpp>
|
||||
#include <ArduinoJson/StaticJsonBuffer.hpp>
|
||||
|
||||
using namespace ArduinoJson;
|
||||
#include <ArduinoJson.h>
|
||||
|
||||
class JsonObject_PrettyPrintTo_Tests : public testing::Test {
|
||||
public:
|
||||
|
@ -5,11 +5,8 @@
|
||||
// https://github.com/bblanchon/ArduinoJson
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <ArduinoJson/JsonArray.hpp>
|
||||
#include <ArduinoJson/JsonObject.hpp>
|
||||
#include <ArduinoJson/StaticJsonBuffer.hpp>
|
||||
#include <ArduinoJson.h>
|
||||
|
||||
using namespace ArduinoJson;
|
||||
using namespace ArduinoJson::Internals;
|
||||
|
||||
class JsonObject_PrintTo_Tests : public testing::Test {
|
||||
|
@ -5,10 +5,7 @@
|
||||
// https://github.com/bblanchon/ArduinoJson
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <ArduinoJson/JsonArray.hpp>
|
||||
#include <ArduinoJson/StaticJsonBuffer.hpp>
|
||||
|
||||
using namespace ArduinoJson;
|
||||
#include <ArduinoJson.h>
|
||||
|
||||
class JsonParser_Array_Tests : public testing::Test {
|
||||
protected:
|
||||
|
@ -5,11 +5,7 @@
|
||||
// https://github.com/bblanchon/ArduinoJson
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <ArduinoJson/JsonArray.hpp>
|
||||
#include <ArduinoJson/JsonObject.hpp>
|
||||
#include <ArduinoJson/StaticJsonBuffer.hpp>
|
||||
|
||||
using namespace ArduinoJson;
|
||||
#include <ArduinoJson.h>
|
||||
|
||||
TEST(JsonParser_Nested_Tests, ArrayNestedInObject) {
|
||||
StaticJsonBuffer<256> jsonBuffer;
|
||||
|
@ -5,11 +5,7 @@
|
||||
// https://github.com/bblanchon/ArduinoJson
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <ArduinoJson/JsonArray.hpp>
|
||||
#include <ArduinoJson/JsonObject.hpp>
|
||||
#include <ArduinoJson/StaticJsonBuffer.hpp>
|
||||
|
||||
using namespace ArduinoJson;
|
||||
#include <ArduinoJson.h>
|
||||
|
||||
class JsonParser_NestingLimit_Tests : public testing::Test {
|
||||
protected:
|
||||
|
@ -5,10 +5,7 @@
|
||||
// https://github.com/bblanchon/ArduinoJson
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <ArduinoJson/StaticJsonBuffer.hpp>
|
||||
#include <ArduinoJson/JsonObject.hpp>
|
||||
|
||||
using namespace ArduinoJson;
|
||||
#include <ArduinoJson.h>
|
||||
|
||||
class JsonParser_Object_Test : public testing::Test {
|
||||
protected:
|
||||
|
@ -5,11 +5,7 @@
|
||||
// https://github.com/bblanchon/ArduinoJson
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <ArduinoJson/StaticJsonBuffer.hpp>
|
||||
#include <ArduinoJson/JsonArray.hpp>
|
||||
#include <ArduinoJson/JsonObject.hpp>
|
||||
|
||||
using namespace ArduinoJson;
|
||||
#include <ArduinoJson.h>
|
||||
|
||||
class JsonVariant_Copy_Tests : public ::testing::Test {
|
||||
protected:
|
||||
|
@ -5,12 +5,9 @@
|
||||
// https://github.com/bblanchon/ArduinoJson
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <ArduinoJson/JsonArray.hpp>
|
||||
#include <ArduinoJson/JsonObject.hpp>
|
||||
#include <ArduinoJson.h>
|
||||
#include "Printers.hpp"
|
||||
|
||||
using namespace ArduinoJson;
|
||||
|
||||
class JsonVariant_Invalid_Tests : public ::testing::Test {
|
||||
public:
|
||||
JsonVariant_Invalid_Tests() : variant(JsonVariant::invalid()) {}
|
||||
|
@ -5,11 +5,7 @@
|
||||
// https://github.com/bblanchon/ArduinoJson
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <ArduinoJson/StaticJsonBuffer.hpp>
|
||||
#include <ArduinoJson/JsonArray.hpp>
|
||||
#include <ArduinoJson/JsonObject.hpp>
|
||||
|
||||
using namespace ArduinoJson;
|
||||
#include <ArduinoJson.h>
|
||||
|
||||
class JsonVariant_Storage_Tests : public ::testing::Test {
|
||||
protected:
|
||||
|
@ -5,11 +5,7 @@
|
||||
// https://github.com/bblanchon/ArduinoJson
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <ArduinoJson/StaticJsonBuffer.hpp>
|
||||
#include <ArduinoJson/JsonArray.hpp>
|
||||
#include <ArduinoJson/JsonObject.hpp>
|
||||
|
||||
using namespace ArduinoJson;
|
||||
#include <ArduinoJson.h>
|
||||
|
||||
class JsonVariant_Subscript_Tests : public ::testing::Test {
|
||||
protected:
|
||||
|
@ -5,12 +5,9 @@
|
||||
// https://github.com/bblanchon/ArduinoJson
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <ArduinoJson/JsonArray.hpp>
|
||||
#include <ArduinoJson/JsonObject.hpp>
|
||||
#include <ArduinoJson.h>
|
||||
#include "Printers.hpp"
|
||||
|
||||
using namespace ArduinoJson;
|
||||
|
||||
class JsonVariant_Undefined_Tests : public ::testing::Test {
|
||||
protected:
|
||||
JsonVariant variant;
|
||||
|
@ -5,10 +5,7 @@
|
||||
// https://github.com/bblanchon/ArduinoJson
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <ArduinoJson/JsonArray.hpp>
|
||||
#include <ArduinoJson/StaticJsonBuffer.hpp>
|
||||
|
||||
using namespace ArduinoJson;
|
||||
#include <ArduinoJson.h>
|
||||
|
||||
TEST(StaticJsonBuffer_Array_Tests, GrowsWithArray) {
|
||||
StaticJsonBuffer<JSON_ARRAY_SIZE(2)> json;
|
||||
|
@ -5,10 +5,7 @@
|
||||
// https://github.com/bblanchon/ArduinoJson
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <ArduinoJson/JsonObject.hpp>
|
||||
#include <ArduinoJson/StaticJsonBuffer.hpp>
|
||||
|
||||
using namespace ArduinoJson;
|
||||
#include <ArduinoJson.h>
|
||||
|
||||
TEST(StaticJsonBuffer_Object_Tests, GrowsWithObject) {
|
||||
StaticJsonBuffer<JSON_OBJECT_SIZE(3)> json;
|
||||
|
Reference in New Issue
Block a user