mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-17 04:22:18 +02:00
Add CopiedString
and LinkedString
This commit is contained in:
@ -19,7 +19,8 @@ TEST_CASE("StringCopier") {
|
||||
str.append('\0');
|
||||
|
||||
REQUIRE(str.isValid() == true);
|
||||
REQUIRE(str.c_str() == std::string("hello"));
|
||||
REQUIRE(std::string(str.str()) == "hello");
|
||||
REQUIRE(pool.overflowed() == false);
|
||||
}
|
||||
|
||||
SECTION("Returns null when too small") {
|
||||
@ -49,7 +50,7 @@ static const char* addStringToPool(MemoryPool& pool, const char* s) {
|
||||
str.startString();
|
||||
str.append(s);
|
||||
str.append('\0');
|
||||
return str.save();
|
||||
return str.save().c_str();
|
||||
}
|
||||
|
||||
TEST_CASE("StringCopier::save() deduplicates strings") {
|
||||
|
Reference in New Issue
Block a user