mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-29 02:07:32 +02:00
Removed Print
class and converted printTo()
to a template method (issue #276)
This commit is contained in:
@ -17,7 +17,7 @@ using namespace ArduinoJson::Internals;
|
||||
void check(const std::string& expected, double input, uint8_t digits = 2) {
|
||||
char output[1024];
|
||||
StaticStringBuilder sb(output, sizeof(output));
|
||||
JsonWriter writer(sb);
|
||||
JsonWriter<StaticStringBuilder> writer(sb);
|
||||
writer.writeFloat(input, digits);
|
||||
REQUIRE(output == expected);
|
||||
REQUIRE(writer.bytesWritten() == expected.size());
|
||||
|
@ -15,7 +15,7 @@ using namespace ArduinoJson::Internals;
|
||||
void check(const char* input, std::string expected) {
|
||||
char output[1024];
|
||||
StaticStringBuilder sb(output, sizeof(output));
|
||||
JsonWriter writer(sb);
|
||||
JsonWriter<StaticStringBuilder> writer(sb);
|
||||
writer.writeString(input);
|
||||
REQUIRE(expected == output);
|
||||
REQUIRE(writer.bytesWritten() == expected.size());
|
||||
|
Reference in New Issue
Block a user