Kept only two namespaces ArduinoJson and ArduinoJson::Internals

This commit is contained in:
Benoit Blanchon
2018-01-19 08:32:15 +01:00
parent bae179ed67
commit e390587e91
53 changed files with 241 additions and 225 deletions

View File

@ -6,6 +6,8 @@
#include <catch.hpp>
#include <sstream>
using namespace ArduinoJson::Internals;
static bool isAligned(void* ptr) {
const size_t mask = sizeof(void*) - 1;
size_t addr = reinterpret_cast<size_t>(ptr);

View File

@ -5,6 +5,8 @@
#include <ArduinoJson.h>
#include <catch.hpp>
using namespace ArduinoJson::Internals;
struct NoMemoryAllocator {
void* allocate(size_t) {
return NULL;

View File

@ -5,7 +5,7 @@
#include <ArduinoJson.h>
#include <catch.hpp>
using namespace ArduinoJson::TypeTraits;
using namespace ArduinoJson::Internals;
TEST_CASE("TypeTraits") {
SECTION("IsBaseOf") {

View File

@ -5,7 +5,7 @@
#include <ArduinoJson/Polyfills/isFloat.hpp>
#include <catch.hpp>
using namespace ArduinoJson::Polyfills;
using namespace ArduinoJson::Internals;
TEST_CASE("isFloat()") {
SECTION("Input is NULL") {

View File

@ -5,7 +5,7 @@
#include <ArduinoJson/Polyfills/isInteger.hpp>
#include <catch.hpp>
using namespace ArduinoJson::Polyfills;
using namespace ArduinoJson::Internals;
TEST_CASE("isInteger()") {
SECTION("Null") {

View File

@ -5,7 +5,7 @@
#include <ArduinoJson/Polyfills/parseFloat.hpp>
#include <catch.hpp>
using namespace ArduinoJson::Polyfills;
using namespace ArduinoJson::Internals;
template <typename T>
void check(const char* input, T expected) {

View File

@ -6,7 +6,7 @@
#include <ArduinoJson/Polyfills/parseInteger.hpp>
#include <catch.hpp>
using namespace ArduinoJson::Polyfills;
using namespace ArduinoJson::Internals;
template <typename T>
void check(const char* input, T expected) {

View File

@ -5,6 +5,8 @@
#include <ArduinoJson.h>
#include <catch.hpp>
using namespace ArduinoJson::Internals;
TEST_CASE("StaticJsonBuffer::startString()") {
SECTION("WorksWhenBufferIsBigEnough") {
StaticJsonBuffer<6> jsonBuffer;