mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 08:42:39 +01:00 
			
		
		
		
	Add a constructor to VariantData
				
					
				
			This commit is contained in:
		| @@ -5,6 +5,11 @@ | ||||
| #include <ArduinoJson.h> | ||||
| #include <catch.hpp> | ||||
|  | ||||
| TEST_CASE("VariantData") { | ||||
|   REQUIRE(std::is_standard_layout<ArduinoJson::detail::VariantData>::value == | ||||
|           true); | ||||
| } | ||||
|  | ||||
| TEST_CASE("JsonVariant from JsonArray") { | ||||
|   SECTION("JsonArray is null") { | ||||
|     JsonArray arr; | ||||
|   | ||||
| @@ -10,8 +10,6 @@ using namespace ArduinoJson::detail; | ||||
|  | ||||
| TEST_CASE("Test unsigned integer overflow") { | ||||
|   VariantData first, second; | ||||
|   first.init(); | ||||
|   second.init(); | ||||
|  | ||||
|   // Avoids MSVC warning C4127 (conditional expression is constant) | ||||
|   size_t integerSize = sizeof(JsonInteger); | ||||
| @@ -30,8 +28,6 @@ TEST_CASE("Test unsigned integer overflow") { | ||||
|  | ||||
| TEST_CASE("Test signed integer overflow") { | ||||
|   VariantData first, second; | ||||
|   first.init(); | ||||
|   second.init(); | ||||
|  | ||||
|   // Avoids MSVC warning C4127 (conditional expression is constant) | ||||
|   size_t integerSize = sizeof(JsonInteger); | ||||
| @@ -50,7 +46,6 @@ TEST_CASE("Test signed integer overflow") { | ||||
|  | ||||
| TEST_CASE("Invalid value") { | ||||
|   VariantData result; | ||||
|   result.init(); | ||||
|  | ||||
|   parseNumber("6a3", result); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user