update ArduinoJson

This commit is contained in:
technyon
2023-03-11 11:11:14 +01:00
parent d134dc9aab
commit 7576244142
368 changed files with 17459 additions and 11509 deletions

View File

@@ -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"
)

View File

@@ -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);

View File

@@ -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) {

View File

@@ -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};