forked from bblanchon/ArduinoJson
Allow mixed configuration in compilation units (issue #809)
This commit is contained in:
@ -63,7 +63,7 @@ TEST_CASE("deserialize MsgPack value") {
|
||||
}
|
||||
|
||||
SECTION("uint 64") {
|
||||
#if ARDUINOJSON_USE_LONG_LONG || ARDUINOJSON_USE_INT64
|
||||
#if ARDUINOJSON_USE_LONG_LONG
|
||||
check<uint64_t>("\xCF\x00\x00\x00\x00\x00\x00\x00\x00", 0U);
|
||||
check<uint64_t>("\xCF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF",
|
||||
0xFFFFFFFFFFFFFFFFU);
|
||||
@ -94,7 +94,7 @@ TEST_CASE("deserialize MsgPack value") {
|
||||
}
|
||||
|
||||
SECTION("int 64") {
|
||||
#if ARDUINOJSON_USE_LONG_LONG || ARDUINOJSON_USE_INT64
|
||||
#if ARDUINOJSON_USE_LONG_LONG
|
||||
check<uint64_t>("\xD3\x00\x00\x00\x00\x00\x00\x00\x00", 0U);
|
||||
check<uint64_t>("\xD3\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF",
|
||||
0xFFFFFFFFFFFFFFFFU);
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include <ArduinoJson.h>
|
||||
#include <catch.hpp>
|
||||
|
||||
using namespace ArduinoJson::Internals;
|
||||
using namespace ARDUINOJSON_NAMESPACE;
|
||||
|
||||
template <typename T>
|
||||
static void check(const char* input, T expected) {
|
||||
@ -17,7 +17,7 @@ static void check(const char* input, T expected) {
|
||||
CHECK(actual == expected);
|
||||
}
|
||||
|
||||
TEST_CASE("Internals::doubleToFloat()") {
|
||||
TEST_CASE("doubleToFloat()") {
|
||||
check("\x40\x09\x21\xCA\xC0\x83\x12\x6F", 3.1415f);
|
||||
check("\x00\x00\x00\x00\x00\x00\x00\x00", 0.0f);
|
||||
check("\x80\x00\x00\x00\x00\x00\x00\x00", -0.0f);
|
||||
|
Reference in New Issue
Block a user