Your ROOT_URL in app.ini is https://source.parasitstudio.de:63000/ but you are visiting https://source.parasitstudio.de/wirtz/MicroDexed/blame/commit/b6e8006b6a45bd49ac851feb65daa5c70e050233/third-party/ArduinoJson/extras/tests/JsonVariant/add.cpp You should set ROOT_URL correctly, otherwise the web may not work correctly.

31 lines
596 B

// ArduinoJson - https://arduinojson.org
// Copyright Benoit Blanchon 2014-2021
// MIT License
#include <ArduinoJson.h>
#include <stdint.h>
#include <catch.hpp>
TEST_CASE("JsonVariant::add()") {
DynamicJsonDocument doc(4096);
JsonVariant var = doc.to<JsonVariant>();
SECTION("integer") {
var.add(42);
REQUIRE(var.as<std::string>() == "[42]");
}
SECTION("const char*") {
var.add("hello");
REQUIRE(var.as<std::string>() == "[\"hello\"]");
}
SECTION("std::string") {
var.add(std::string("hello"));
REQUIRE(var.as<std::string>() == "[\"hello\"]");
}
}