Fixed value returned by serializeXxx() when writing to a String

This commit is contained in:
Benoit Blanchon
2020-01-14 10:32:52 +01:00
parent 25879466da
commit 3aebef6d0a
4 changed files with 48 additions and 2 deletions

View File

@ -2,6 +2,7 @@
// Copyright Benoit Blanchon 2014-2020
// MIT License
#define ARDUINOJSON_ENABLE_ARDUINO_STRING 1
#include <ArduinoJson.h>
#include <catch.hpp>
#include "custom_string.hpp"
@ -55,6 +56,12 @@ TEST_CASE("Writer<std::string>") {
common_tests(sb, output);
}
TEST_CASE("Writer<String>") {
::String output;
Writer< ::String> sb(output);
common_tests(sb, output);
}
TEST_CASE("Writer<custom_string>") {
custom_string output;
Writer<custom_string> sb(output);