Removed usages of JsonNodeIterator

This commit is contained in:
Benoit Blanchon
2014-10-24 18:31:50 +02:00
parent 68fb03577c
commit 1f6cd8e56e
16 changed files with 84 additions and 40 deletions

View File

@ -1,7 +1,7 @@
set(GTEST_DIR ../third-party/gtest-1.7.0)
file(GLOB_RECURSE INC_FILES ../include/*.h)
file(GLOB TESTS_FILES *.cpp)
file(GLOB TESTS_FILES *.hpp *.cpp)
include_directories(
../include

View File

@ -7,6 +7,7 @@
#include <gtest/gtest.h>
#include <ArduinoJson/StaticJsonBuffer.hpp>
#include <ArduinoJson/JsonValue.hpp>
#include "Printers.hpp"
using namespace ArduinoJson;
@ -81,8 +82,8 @@ TEST_F(JsonArray_Container_Tests, CanStoreBooleans) {
}
TEST_F(JsonArray_Container_Tests, CanStoreStrings) {
const char *firstString = "h3110";
const char *secondString = "w0r1d";
const char* firstString = "h3110";
const char* secondString = "w0r1d";
array.add(firstString);
array.add(secondString);

View File

@ -7,6 +7,7 @@
#include <gtest/gtest.h>
#include <ArduinoJson/StaticJsonBuffer.hpp>
#include <ArduinoJson/JsonValue.hpp>
#include "Printers.hpp"
using namespace ArduinoJson;

12
test/Printers.cpp Normal file
View File

@ -0,0 +1,12 @@
// Copyright Benoit Blanchon 2014
// MIT License
//
// Arduino JSON library
// https://github.com/bblanchon/ArduinoJson
#include "Printers.hpp"
std::ostream& operator<<(std::ostream& os, const ArduinoJson::JsonValue& v) {
os << "JsonValue"; // TODO
return os;
}

12
test/Printers.hpp Normal file
View File

@ -0,0 +1,12 @@
// Copyright Benoit Blanchon 2014
// MIT License
//
// Arduino JSON library
// https://github.com/bblanchon/ArduinoJson
#pragma once
#include <ArduinoJson/ForwardDeclarations.hpp>
#include <ostream>
std::ostream& operator<<(std::ostream& os, const ArduinoJson::JsonValue& v);