Use strlen() for literals too

This commit is contained in:
Benoit Blanchon
2025-02-27 13:41:25 +01:00
parent 7dfa163695
commit 907bb43481
5 changed files with 7 additions and 8 deletions
+2 -2
View File
@@ -22,10 +22,10 @@ TEST_CASE("JsonDocument::remove()") {
SECTION("string literal") {
doc["a"] = 1;
doc["a\0b"_s] = 2;
doc["x"] = 2;
doc["b"] = 3;
doc.remove("a\0b");
doc.remove("x");
REQUIRE(doc.as<std::string>() == "{\"a\":1,\"b\":3}");
}