mirror of
https://github.com/red0124/ssp.git
synced 2025-12-14 21:59:55 +01:00
add tests for error mode
This commit is contained in:
@@ -322,3 +322,16 @@ TEST_CASE("testing ss:ne restriction (not empty)") {
|
||||
CHECK(tup == extracted_vector);
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("testing error mode") {
|
||||
ss::converter c;
|
||||
|
||||
c.convert<int>("junk");
|
||||
CHECK(!c.valid());
|
||||
CHECK(!c.error_msg().empty());
|
||||
|
||||
c.set_error_mode(ss::error_mode::Bool);
|
||||
c.convert<int>("junk");
|
||||
CHECK(!c.valid());
|
||||
CHECK(c.error_msg().empty());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user