+ more test cases
This commit is contained in:
parent
cd48a01b20
commit
b2b5e4e7e1
1 changed files with 14 additions and 1 deletions
|
@ -1091,8 +1091,20 @@ TEST_CASE("Iterators")
|
|||
JSON j7 = "hello";
|
||||
|
||||
// operator *
|
||||
CHECK_THROWS_AS(* j1.end(), std::runtime_error);
|
||||
CHECK_THROWS_AS(* j1.cend(), std::runtime_error);
|
||||
CHECK_THROWS_AS(* j2.end(), std::runtime_error);
|
||||
CHECK_THROWS_AS(* j2.cend(), std::runtime_error);
|
||||
CHECK_THROWS_AS(* j3.end(), std::runtime_error);
|
||||
CHECK_THROWS_AS(* j3.cend(), std::runtime_error);
|
||||
CHECK_THROWS_AS(* j4.end(), std::runtime_error);
|
||||
CHECK_THROWS_AS(* j4.end(), std::runtime_error);
|
||||
CHECK_THROWS_AS(* j4.cend(), std::runtime_error);
|
||||
CHECK_THROWS_AS(* j5.end(), std::runtime_error);
|
||||
CHECK_THROWS_AS(* j5.cend(), std::runtime_error);
|
||||
CHECK_THROWS_AS(* j6.end(), std::runtime_error);
|
||||
CHECK_THROWS_AS(* j6.cend(), std::runtime_error);
|
||||
CHECK_THROWS_AS(* j7.end(), std::runtime_error);
|
||||
CHECK_THROWS_AS(* j7.cend(), std::runtime_error);
|
||||
|
||||
// operator ->
|
||||
CHECK(j1.begin()->type() == JSON::value_type::number);
|
||||
|
@ -1602,5 +1614,6 @@ TEST_CASE("Parser")
|
|||
{
|
||||
CHECK_THROWS_AS(JSON::parse(""), std::invalid_argument);
|
||||
CHECK_THROWS_AS(JSON::parse(std::string("")), std::invalid_argument);
|
||||
CHECK_THROWS_AS(JSON::parse("[1,2"), std::invalid_argument);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue