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

26 lines
572 B

// ArduinoJson - https://arduinojson.org
// Copyright Benoit Blanchon 2014-2021
// MIT License
#include <ArduinoJson.h>
#include <catch.hpp>
TEST_CASE("JsonArray::clear()") {
SECTION("No-op on null JsonArray") {
JsonArray array;
array.clear();
REQUIRE(array.isNull() == true);
REQUIRE(array.size() == 0);
}
SECTION("Removes all elements") {
StaticJsonDocument<64> doc;
JsonArray array = doc.to<JsonArray>();
array.add(1);
array.add(2);
array.clear();
REQUIRE(array.size() == 0);
REQUIRE(array.isNull() == false);
}
}