8000 Use jumbo/unity build for the tests · Cube-Line/ArduinoJson@d459bfd · GitHub
[go: up one dir, main page]

Skip to content

Commit d459bfd

Browse files
committed
Use jumbo/unity build for the tests
1 parent 77f38e4 commit d459bfd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+671
-618
lines changed

test/ElementProxy/CMakeLists.txt

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@
22
# Copyright Benoit Blanchon 2014-2019
33
# MIT License
44

5-
add_executable(ElementProxyTests
6-
add.cpp
7-
clear.cpp
8-
remove.cpp
9-
set.cpp
10-
size.cpp
11-
)
12-
5+
add_executable(ElementProxyTests bundle.cpp)
136
target_link_libraries(ElementProxyTests catch)
147
add_test(ElementProxy ElementProxyTests)

test/ElementProxy/bundle.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// ArduinoJson - arduinojson.org
2+
// Copyright Benoit Blanchon 2014-2019
3+
// MIT License
4+
5+
#include "add.cpp"
6+
#include "clear.cpp"
7+
#include "remove.cpp"
8+
#include "set.cpp"
9+
#include "size.cpp"

test/IntegrationTests/CMakeLists.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22
# Copyright Benoit Blanchon 2014-2019
33
# MIT License
44

5-
add_executable(IntegrationTests
6-
gbathree.cpp
7-
issue772.cpp
8-
round_trip.cpp
9-
)
5+
add_executable(IntegrationTests bundle.cpp)
106

117
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
128
target_compile_options(IntegrationTests

test/IntegrationTests/bundle.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// ArduinoJson - arduinojson.org
2+
// Copyright Benoit Blanchon 2014-2019
3+
// MIT License
4+
5+
#include "gbathree.cpp"
6+
#include "issue772.cpp"
7+
#include "round_trip.cpp"

test/JsonArray/CMakeLists.txt

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,6 @@
22
# Copyright Benoit Blanchon 2014-2019
33
# MIT License
44

5-
add_executable(JsonArrayTests
6-
add.cpp
7-
copyArray.cpp
8-
createNested.cpp
9-
equals.cpp
10-
get.cpp
11-
isNull.cpp
12-
iterator.cpp
13-
memoryUsage.cpp
14-
nesting.cpp
15-
remove.cpp
16-
size.cpp
17-
std_string.cpp
18-
subscript.cpp
19-
undefined.cpp
20-
)
21-
5+
add_executable(JsonArrayTests bundle.cpp)
226
target_link_libraries(JsonArrayTests catch)
237
add_test(JsonArray JsonArrayTests)

test/JsonArray/bundle.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// ArduinoJson - arduinojson.org
2+
// Copyright Benoit Blanchon 2014-2019
3+
// MIT License
4+
5+
#include "add.cpp"
6+
#include "copyArray.cpp"
7+
#include "createNested.cpp"
8+
#include "equals.cpp"
9+
#include "get.cpp"
10+
#include "isNull.cpp"
11+
#include "iterator.cpp"
12+
#include "memoryUsage.cpp"
13+
#include "nesting.cpp"
14+
#include "remove.cpp"
15+
#include "size.cpp"
16+
#include "std_string.cpp"
17+
#include "subscript.cpp"
18+
#include "undefined.cpp"

test/JsonDeserializer/CMakeLists.txt

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,6 @@
22
# Copyright Benoit Blanchon 2014-2019
33
# MIT License
44

5-
add_executable(JsonDeserializerTests
6-
DeserializationError.cpp
7-
deserializeJsonArray.cpp
8-
deserializeJsonArrayStatic.cpp
9-
deserializeJsonObject.cpp
10-
deserializeJsonObjectStatic.cpp
11-
deserializeJsonValue.cpp
12-
deserializeJsonString.cpp
13-
input_types.cpp
14-
incomplete_input.cpp
15-
invalid_input.cpp
16-
nestingLimit.cpp
17-
)
18-
5+
add_executable(JsonDeserializerTests bundle.cpp)
196
target_link_libraries(JsonDeserializerTests catch)
207
add_test(JsonDeserializer JsonDeserializerTests)

test/JsonDeserializer/bundle.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// ArduinoJson - arduinojson.org
2+
// Copyright Benoit Blanchon 2014-2019
3+
// MIT License
4+
5+
#define ARDUINOJSON_DECODE_UNICODE 1
6+
7+
#include "DeserializationError.cpp"
8+
#include "deserializeJsonArray.cpp"
9+
#include "deserializeJsonArrayStatic.cpp"
10+
#include "deserializeJsonObject.cpp"
11+
#include "deserializeJsonObjectStatic.cpp"
12+
#include "deserializeJsonString.cpp"
13+
#include "deserializeJsonValue.cpp"
14+
#include "incomplete_input.cpp"
15+
#include "input_types.cpp"
16+
#include "invalid_input.cpp"
17+
#include "nestingLimit.cpp"

test/JsonDeserializer/deserializeJsonString.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// Copyright Benoit Blanchon 2014-2019
33
// MIT License
44

5-
#define ARDUINOJSON_DECODE_UNICODE 1
65
#include <ArduinoJson.h>
76
#include <catch.hpp>
87

test/JsonDocument/CMakeLists.txt

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,6 @@
22
# Copyright Benoit Blanchon 2014-2019
33
# MIT License
44

5-
add_executable(JsonDocumentTests
6-
add.cpp
7-
createNested.cpp
8-
DynamicJsonDocument.cpp
9-
isNull.cpp
10-
nesting.cpp
11-
remove.cpp
12-
size.cpp
13-
StaticJsonDocument.cpp
14-
subscript.cpp
15-
)
16-
5+
add_executable(JsonDocumentTests bundle.cpp)
176
target_link_libraries(JsonDocumentTests catch)
187
add_test(JsonDocument JsonDocumentTests)

test/JsonDocument/DynamicJsonDocument.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,10 @@
44

55
#include <ArduinoJson.h>
66
#include <catch.hpp>
7+
#include "utils.hpp"
78

89
using ARDUINOJSON_NAMESPACE::addPadding;
910

10-
static void REQUIRE_JSON(JsonDocument& doc, const std::string& expected) {
11-
std::string json;
12-
serializeJson(doc, json);
13-
REQUIRE(json == expected);
14-
}
15-
1611
TEST_CASE("DynamicJsonDocument") {
1712
DynamicJsonDocument doc(4096);
1813

test/JsonDocument/StaticJsonDocument.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,7 @@
44

55
#include <ArduinoJson.h>
66
#include <catch.hpp>
7-
8-
static void REQUIRE_JSON(JsonDocument& doc, const std::string& expected) {
9-
std::string json;
10-
serializeJson(doc, json);
11-
REQUIRE(json == expected);
12-
}
7+
#include "utils.hpp"
138

149
TEST_CASE("StaticJsonDocument") {
1510
SECTION("capacity()") {

test/JsonDocument/bundle.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// ArduinoJson - arduinojson.org
2+
// Copyright Benoit Blanchon 2014-2019
3+
// MIT License
4+
5+
#include "DynamicJsonDocument.cpp"
6+
#include "StaticJsonDocument.cpp"
7+
#include "add.cpp"
8+
#include "createNested.cpp"
9+
#include "isNull.cpp"
10+
#include "nesting.cpp"
11+
#include "remove.cpp"
12+
#include "size.cpp"
13+
#include "subscript.cpp"

test/JsonDocument/utils.hpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// ArduinoJson - arduinojson.org
2+
// Copyright Benoit Blanchon 2014-2019
3+
// MIT License
4+
5+
#pragma once
6+
7+
static void REQUIRE_JSON(JsonDocument& doc, const std::string& expected) {
8+
std::string json;
9+
serializeJson(doc, json);
10+
REQUIRE(json == expected);
11+
}

test/JsonObject/CMakeLists.txt

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,6 @@
22
# Copyright Benoit Blanchon 2014-2019
33
# MIT License
44

5-
add_executable(JsonObjectTests
6-
containsKey.cpp
7-
copy.cpp
8-
createNestedArray.cpp
9-
createNestedObject.cpp
10-
equals.cpp
11-
invalid.cpp
12-
isNull.cpp
13-
iterator.cpp
14-
memoryUsage.cpp
15-
nesting.cpp
16-
remove.cpp
17-
size.cpp
18-
std_string.cpp
19-
subscript.cpp
20-
)
21-
5+
add_executable(JsonObjectTests bundle.cpp)
226
target_link_libraries(JsonObjectTests catch)
237
add_test(JsonObject JsonObjectTests)

test/JsonObject/bundle.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// ArduinoJson - arduinojson.org
2+
// Copyright Benoit Blanchon 2014-2019
3+
// MIT License
4+
5+
#include "containsKey.cpp"
6+
#include "copy.cpp"
7+
#include "createNestedArray.cpp"
8+
#include "createNestedObject.cpp"
9+
#include "equals.cpp"
10+
#include "invalid.cpp"
11+
#include "isNull.cpp"
12+
#include "iterator.cpp"
13+
#include "memoryUsage.cpp"
14+
#include "nesting.cpp"
15+
#include "remove.cpp"
16+
#include "size.cpp"
17+
#include "std_string.cpp"
18+
#include "subscript.cpp"

test/JsonSerializer/CMakeLists.txt

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,6 @@
22
# Copyright Benoit Blanchon 2014-2019
33
# MIT License
44

5-
add_executable(JsonSerializerTests
6-
JsonArray.cpp
7-
JsonArrayPretty.cpp
8-
JsonObject.cpp
9-
JsonObjectPretty.cpp
10-
JsonVariant.cpp
11-
misc.cpp
12-
std_stream.cpp
13-
std_string.cpp
14-
)
15-
5+
add_executable(JsonSerializerTests bundle.cpp)
166
target_link_libraries(JsonSerializerTests catch)
177
add_test(JsonSerializer JsonSerializerTests)

0 commit comments

Comments
 (0)
0