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

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

View File

@ -4,6 +4,8 @@
#include <catch.hpp>
#include <string>
#include "Literals.hpp"
TEST_CASE("ARDUINOJSON_STRING_LENGTH_SIZE == 2") {
JsonDocument doc;
@ -87,8 +89,7 @@ TEST_CASE("ARDUINOJSON_STRING_LENGTH_SIZE == 2") {
}
SECTION("returns NoMemory if string length >= 65536") {
auto input =
std::string("\xdb\x00\x01\x00\x00", 5) + std::string(65536, '?');
auto input = "\xdb\x00\x01\x00\x00"_s + std::string(65536, '?');
auto err = deserializeMsgPack(doc, input);