8000 Migrate · sarfata/ArduinoJson@214daf7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 214daf7

Browse files
committed
Migrate
1 parent 3387eea commit 214daf7

File tree

3 files changed

+7
-14
lines changed

3 files changed

+7
-14
lines changed

test/JsonVariant/compare.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -212,14 +212,10 @@ TEST_CASE("JsonVariant comparisons") {
212212
}
213213

214214
SECTION("VariantsOfDifferentTypes") {
215-
DynamicJsonBuffer jsonBuffer;
215+
DynamicJsonArray array;
216+
DynamicJsonObject object;
216217
JsonVariant variants[] = {
217-
true,
218-
42,
219-
666.667,
220-
"hello",
221-
jsonBuffer.createArray(),
222-
jsonBuffer.createObject(),
218+
true, 42, 666.667, "hello", array, object,
223219
};
224220
size_t n = sizeof(variants) / sizeof(variants[0]);
225221

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#include <catch.hpp>
1010

1111
TEST_CASE("JsonVariant copy") {
12-
DynamicJsonBuffer _jsonBuffer;
1312
JsonVariant _variant1;
1413
JsonVariant _variant2;
1514

@@ -46,7 +45,7 @@ TEST_CASE("JsonVariant copy") {
4645
}
4746

4847
SECTION("ObjectsAreCopiedByReference") {
49-
JsonObject &object = _jsonBuffer.createObject();
48+
DynamicJsonObject object;
5049

5150
_variant1 = object;
5251

@@ -56,7 +55,7 @@ TEST_CASE("JsonVariant copy") {
5655
}
5756

5857
SECTION("ArraysAreCopiedByReference") {
59-
JsonArray &array = _jsonBuffer.createArray();
58+
DynamicJsonArray array;
6059

6160
_variant1 = array;
6261

test/JsonVariant/set_get.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,7 @@ TEST_CASE("JsonVariant set()/get()") {
125125
#endif
126126

127127
SECTION("CanStoreObject") {
128-
DynamicJsonBuffer jsonBuffer;
129-
JsonObject &object = jsonBuffer.createObject();
130-
131-
checkReference(object);
128+
DynamicJsonObject object;
129+
checkReference<JsonObject>(object);
132130
}
133131
}

0 commit comments

Comments
 (0)
0