update ArduinoJson
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
# ArduinoJson - https://arduinojson.org
|
||||
# Copyright © 2014-2022, Benoit BLANCHON
|
||||
# Copyright © 2014-2023, Benoit BLANCHON
|
||||
# MIT License
|
||||
|
||||
add_executable(TextFormatterTests
|
||||
add_executable(TextFormatterTests
|
||||
writeFloat.cpp
|
||||
writeInteger.cpp
|
||||
writeString.cpp
|
||||
@@ -14,5 +14,5 @@ add_test(TextFormatter TextFormatterTests)
|
||||
|
||||
set_tests_properties(TextFormatter
|
||||
PROPERTIES
|
||||
LABELS "Catch"
|
||||
LABELS "Catch"
|
||||
)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// ArduinoJson - https://arduinojson.org
|
||||
// Copyright © 2014-2022, Benoit BLANCHON
|
||||
// Copyright © 2014-2023, Benoit BLANCHON
|
||||
// MIT License
|
||||
|
||||
#include <catch.hpp>
|
||||
@@ -11,13 +11,13 @@
|
||||
#include <ArduinoJson/Json/TextFormatter.hpp>
|
||||
#include <ArduinoJson/Serialization/Writer.hpp>
|
||||
|
||||
using namespace ARDUINOJSON_NAMESPACE;
|
||||
using namespace ArduinoJson::detail;
|
||||
|
||||
template <typename TFloat>
|
||||
void check(TFloat input, const std::string& expected) {
|
||||
std::string output;
|
||||
Writer<std::string> sb(output);
|
||||
TextFormatter<Writer<std::string> > writer(sb);
|
||||
TextFormatter<Writer<std::string>> writer(sb);
|
||||
writer.writeFloat(input);
|
||||
REQUIRE(writer.bytesWritten() == output.size());
|
||||
CHECK(expected == output);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// ArduinoJson - https://arduinojson.org
|
||||
// Copyright © 2014-2022, Benoit BLANCHON
|
||||
// Copyright © 2014-2023, Benoit BLANCHON
|
||||
// MIT License
|
||||
|
||||
#include <catch.hpp>
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <ArduinoJson/Json/TextFormatter.hpp>
|
||||
#include <ArduinoJson/Serialization/Writer.hpp>
|
||||
|
||||
using namespace ARDUINOJSON_NAMESPACE;
|
||||
using namespace ArduinoJson::detail;
|
||||
|
||||
template <typename T>
|
||||
void checkWriteInteger(T value, std::string expected) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// ArduinoJson - https://arduinojson.org
|
||||
// Copyright © 2014-2022, Benoit BLANCHON
|
||||
// Copyright © 2014-2023, Benoit BLANCHON
|
||||
// MIT License
|
||||
|
||||
#include <catch.hpp>
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <ArduinoJson/Json/TextFormatter.hpp>
|
||||
#include <ArduinoJson/Serialization/Writers/StaticStringWriter.hpp>
|
||||
|
||||
using namespace ARDUINOJSON_NAMESPACE;
|
||||
using namespace ArduinoJson::detail;
|
||||
|
||||
void check(const char* input, std::string expected) {
|
||||
char output[64] = {0};
|
||||
|
||||
Reference in New Issue
Block a user