mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 08:42:39 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			35 lines
		
	
	
		
			687 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			687 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| // ArduinoJson - arduinojson.org
 | |
| // Copyright Benoit Blanchon 2014-2018
 | |
| // MIT License
 | |
| 
 | |
| #include <ArduinoJson.h>
 | |
| #include <catch.hpp>
 | |
| 
 | |
| TEST_CASE("JsonArray::isNull()") {
 | |
|   DynamicJsonDocument doc(4096);
 | |
| 
 | |
|   SECTION("returns true") {
 | |
|     JsonArray arr;
 | |
|     REQUIRE(arr.isNull() == true);
 | |
|   }
 | |
| 
 | |
|   SECTION("returns false") {
 | |
|     JsonArray arr = doc.to<JsonArray>();
 | |
|     REQUIRE(arr.isNull() == false);
 | |
|   }
 | |
| }
 | |
| 
 | |
| TEST_CASE("JsonArrayConst::isNull()") {
 | |
|   DynamicJsonDocument doc(4096);
 | |
| 
 | |
|   SECTION("returns true") {
 | |
|     JsonArrayConst arr;
 | |
|     REQUIRE(arr.isNull() == true);
 | |
|   }
 | |
| 
 | |
|   SECTION("returns false") {
 | |
|     JsonArrayConst arr = doc.to<JsonArray>();
 | |
|     REQUIRE(arr.isNull() == false);
 | |
|   }
 | |
| }
 |