more test cases
This commit is contained in:
		
							parent
							
								
									f1bd206994
								
							
						
					
					
						commit
						3f46fe7a08
					
				
					 1 changed files with 23 additions and 0 deletions
				
			
		|  | @ -4112,6 +4112,29 @@ TEST_CASE("parser class") | |||
|             CHECK(json::parser("false").parse() == json(false)); | ||||
|         } | ||||
| 
 | ||||
|         SECTION("array") | ||||
|         { | ||||
|             SECTION("empty array") | ||||
|             { | ||||
|                 CHECK(json::parser("[]").parse() == json(json::value_t::array)); | ||||
|                 CHECK(json::parser("[ ]").parse() == json(json::value_t::array)); | ||||
|             } | ||||
| 
 | ||||
|             SECTION("nonempty array") | ||||
|             { | ||||
|                 CHECK(json::parser("[true, false, null]").parse() == json({true, false, nullptr})); | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         SECTION("object") | ||||
|         { | ||||
|             SECTION("empty object") | ||||
|             { | ||||
|                 CHECK(json::parser("{}").parse() == json(json::value_t::object)); | ||||
|                 CHECK(json::parser("{ }").parse() == json(json::value_t::object)); | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         SECTION("number") | ||||
|         { | ||||
|             SECTION("integers") | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue