mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 08:42:39 +01:00 
			
		
		
		
	Reduced stack usage when compiled with -Og (issue #1210)
This saves 96 bytes on ESP8266
This commit is contained in:
		| @@ -8,17 +8,17 @@ | ||||
| using namespace ARDUINOJSON_NAMESPACE; | ||||
|  | ||||
| TEST_CASE("Test uint32_t overflow") { | ||||
|   ParsedNumber<float, uint32_t> first = | ||||
|       parseNumber<float, uint32_t>("4294967295"); | ||||
|   ParsedNumber<float, uint32_t> second = | ||||
|       parseNumber<float, uint32_t>("4294967296"); | ||||
|   ParsedNumber<float, uint32_t> first, second; | ||||
|   parseNumber("4294967295", first); | ||||
|   parseNumber("4294967296", second); | ||||
|  | ||||
|   REQUIRE(first.type() == uint8_t(VALUE_IS_POSITIVE_INTEGER)); | ||||
|   REQUIRE(second.type() == uint8_t(VALUE_IS_FLOAT)); | ||||
| } | ||||
|  | ||||
| TEST_CASE("Invalid value") { | ||||
|   ParsedNumber<float, uint32_t> result = parseNumber<float, uint32_t>("6a3"); | ||||
|   ParsedNumber<float, uint32_t> result; | ||||
|   parseNumber("6a3", result); | ||||
|  | ||||
|   REQUIRE(result.type() == uint8_t(VALUE_IS_NULL)); | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user