mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
initial commit
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
// ArduinoJson - arduinojson.org
|
||||
// Copyright Benoit Blanchon 2014-2020
|
||||
// MIT License
|
||||
|
||||
#include <ArduinoJson.h>
|
||||
#include <stdint.h>
|
||||
#include <catch.hpp>
|
||||
|
||||
TEST_CASE("JsonVariant::clear()") {
|
||||
DynamicJsonDocument doc(4096);
|
||||
JsonVariant var = doc.to<JsonVariant>();
|
||||
|
||||
SECTION("size goes back to zero") {
|
||||
var.add(42);
|
||||
var.clear();
|
||||
|
||||
REQUIRE(var.size() == 0);
|
||||
}
|
||||
|
||||
SECTION("isNull() return true") {
|
||||
var.add("hello");
|
||||
var.clear();
|
||||
|
||||
REQUIRE(var.isNull() == true);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user