mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-14 11:06:35 +02:00
Tests: add user-defined literal ""_s
for std::string
This commit is contained in:
@ -6,6 +6,7 @@
|
||||
#include <catch.hpp>
|
||||
|
||||
#include "Allocators.hpp"
|
||||
#include "Literals.hpp"
|
||||
|
||||
using ArduinoJson::detail::addPadding;
|
||||
|
||||
@ -20,7 +21,7 @@ TEST_CASE("JsonDocument constructor") {
|
||||
SECTION("JsonDocument(const JsonDocument&)") {
|
||||
{
|
||||
JsonDocument doc1(&spyingAllocator);
|
||||
doc1.set(std::string("The size of this string is 32!!"));
|
||||
doc1.set("The size of this string is 32!!"_s);
|
||||
|
||||
JsonDocument doc2(doc1);
|
||||
|
||||
@ -38,7 +39,7 @@ TEST_CASE("JsonDocument constructor") {
|
||||
SECTION("JsonDocument(JsonDocument&&)") {
|
||||
{
|
||||
JsonDocument doc1(&spyingAllocator);
|
||||
doc1.set(std::string("The size of this string is 32!!"));
|
||||
doc1.set("The size of this string is 32!!"_s);
|
||||
|
||||
JsonDocument doc2(std::move(doc1));
|
||||
|
||||
|
Reference in New Issue
Block a user