Tests: add user-defined literal ""_s for std::string

This commit is contained in:
Benoit Blanchon committed 2024-06-07 09:35:45 +02:00
1 parent 5b88b2c1f6
commit 45611924f3
55 files changed
+316 -229

No files matched your search

+3 -1
View File
@@ -5,6 +5,8 @@
#include <ArduinoJson.h>
#include <catch.hpp>
#include "Literals.hpp"
TEST_CASE("JsonDocument::remove()") {
JsonDocument doc;
@@ -31,7 +33,7 @@ TEST_CASE("JsonDocument::remove()") {
doc["a"] = 1;
doc["b"] = 2;
doc.remove(std::string("b"));
doc.remove("b"_s);
REQUIRE(doc.as<std::string>() == "{\"a\":1}");
}