forked from bblanchon/ArduinoJson
Replace ARDUINOJSON_NAMESPACE
with an inline namespace (#1820)
This commit is contained in:
@ -1,11 +1,11 @@
|
||||
#define ARDUINOJSON_NAMESPACE ArduinoJson_NoAlignment
|
||||
#define ARDUINOJSON_VERSION_NAMESPACE NoAlignment
|
||||
#define ARDUINOJSON_ENABLE_ALIGNMENT 0
|
||||
#include <ArduinoJson.h>
|
||||
|
||||
#include <catch.hpp>
|
||||
|
||||
TEST_CASE("ARDUINOJSON_ENABLE_ALIGNMENT == 0") {
|
||||
using namespace ARDUINOJSON_NAMESPACE;
|
||||
using namespace ArduinoJson::detail;
|
||||
|
||||
const size_t N = sizeof(void*);
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <catch.hpp>
|
||||
|
||||
TEST_CASE("ARDUINOJSON_ENABLE_ALIGNMENT == 1") {
|
||||
using namespace ARDUINOJSON_NAMESPACE;
|
||||
using namespace ArduinoJson::detail;
|
||||
|
||||
const size_t N = sizeof(void*);
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include <limits>
|
||||
|
||||
namespace my {
|
||||
using ARDUINOJSON_NAMESPACE::isinf;
|
||||
using ArduinoJson::detail::isinf;
|
||||
} // namespace my
|
||||
|
||||
TEST_CASE("ARDUINOJSON_ENABLE_INFINITY == 1") {
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include <limits>
|
||||
|
||||
namespace my {
|
||||
using ARDUINOJSON_NAMESPACE::isnan;
|
||||
using ArduinoJson::detail::isnan;
|
||||
} // namespace my
|
||||
|
||||
TEST_CASE("ARDUINOJSON_ENABLE_NAN == 1") {
|
||||
|
@ -53,7 +53,7 @@ TEST_CASE("Flash strings") {
|
||||
}
|
||||
|
||||
TEST_CASE("parseNumber()") { // tables are in Flash
|
||||
using ARDUINOJSON_NAMESPACE::parseNumber;
|
||||
using ArduinoJson::detail::parseNumber;
|
||||
|
||||
CHECK(parseNumber<float>("1") == 1.f);
|
||||
CHECK(parseNumber<float>("1.23") == 1.23f);
|
||||
@ -95,7 +95,7 @@ TEST_CASE("memcpy_P") {
|
||||
}
|
||||
|
||||
TEST_CASE("BoundedReader<const __FlashStringHelper*>") {
|
||||
using namespace ARDUINOJSON_NAMESPACE;
|
||||
using namespace ArduinoJson::detail;
|
||||
|
||||
SECTION("read") {
|
||||
BoundedReader<const __FlashStringHelper*> reader(F("\x01\xFF"), 2);
|
||||
@ -135,7 +135,7 @@ TEST_CASE("BoundedReader<const __FlashStringHelper*>") {
|
||||
}
|
||||
|
||||
TEST_CASE("Reader<const __FlashStringHelper*>") {
|
||||
using namespace ARDUINOJSON_NAMESPACE;
|
||||
using namespace ArduinoJson::detail;
|
||||
|
||||
SECTION("read()") {
|
||||
Reader<const __FlashStringHelper*> reader(F("\x01\xFF\x00\x12"));
|
||||
|
Reference in New Issue
Block a user