mirror of
https://github.com/SOCI/soci.git
synced 2026-04-28 15:19:36 -05:00
Add get_error_category() test to PostgreSQL tests
Use this function in at least one of the tests to check that it's not totally broken.
This commit is contained in:
@@ -692,8 +692,10 @@ TEST_CASE("PostgreSQL statement prepare failure", "[postgresql][prepare]")
|
||||
<< "select * from soci_test where name=9999");
|
||||
FAIL("expected exception not thrown");
|
||||
}
|
||||
catch(soci_error const& e)
|
||||
catch (postgresql_soci_error const& e)
|
||||
{
|
||||
CHECK( e.get_error_category() == soci_error::invalid_statement );
|
||||
|
||||
CHECK_THAT( e.what(), Catch::Contains("operator does not exist") );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user