Fix overflowed()

This commit is contained in:
Benoit Blanchon committed 2025-02-27 13:42:05 +01:00
1 parent b529056a4a
commit f95dd7d204
5 files changed
+65 -23

No files matched your search

+14
View File
@@ -257,6 +257,20 @@ TEST_CASE("JsonVariant::set() with not enough memory") {
JsonVariant v = doc.to<JsonVariant>();
SECTION("string literal") {
bool result = v.set("hello world");
REQUIRE(result == false);
REQUIRE(v.isNull());
}
SECTION("static JsonString") {
bool result = v.set(JsonString("hello world", true));
REQUIRE(result == false);
REQUIRE(v.isNull());
}
SECTION("std::string") {
bool result = v.set("hello world!!"_s);