Use strlen() for literals too

This commit is contained in:
Benoit Blanchon committed 2025-02-27 13:41:25 +01:00
1 parent 7dfa163695
commit 907bb43481
5 files changed
+7 -8

No files matched your search

+1 -1
View File
@@ -57,7 +57,7 @@ TEST_CASE("JsonVariantConst::operator[]") {
SECTION("string literal") {
REQUIRE(var["ab"] == "AB"_s);
REQUIRE(var["abc"] == "ABC"_s);
REQUIRE(var["abc\0d"] == "ABCD"_s);
REQUIRE(var["abc\0d"] == "ABC"_s);
REQUIRE(var["def"].isNull());
REQUIRE(var[0].isNull());
}