mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 16:14:11 +01:00 
			
		
		
		
	Added a test that adds a 'false' to an array
This commit is contained in:
		| @@ -87,7 +87,7 @@ public: | |||||||
|                 break; |                 break; | ||||||
|  |  | ||||||
|             case JSON_BOOLEAN: |             case JSON_BOOLEAN: | ||||||
|                 append(buffer, bufferSize, "true"); |                 append(buffer, bufferSize, items[i].value.boolean ? "true" : "false"); | ||||||
|                 break; |                 break; | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -71,6 +71,13 @@ namespace JsonGeneratorTests | |||||||
|             AssertJsonIs("[true]"); |             AssertJsonIs("[true]"); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  |         TEST_METHOD(AddFalse) | ||||||
|  |         { | ||||||
|  |             arr.add(false); | ||||||
|  |  | ||||||
|  |             AssertJsonIs("[false]"); | ||||||
|  |         } | ||||||
|  |  | ||||||
|         void AssertJsonIs(const char* expected) |         void AssertJsonIs(const char* expected) | ||||||
|         {       |         {       | ||||||
|             char buffer[256]; |             char buffer[256]; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user