summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test-postgresql.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test-postgresql.cpp b/test/test-postgresql.cpp
index 3a12f43..eaf6d58 100644
--- a/test/test-postgresql.cpp
+++ b/test/test-postgresql.cpp
@@ -22,11 +22,11 @@ BOOST_AUTO_TEST_CASE(simple)
BOOST_CHECK_THROW(([]() {
MyGrate::Output::Pq::PqConn {"nonsense"};
}()),
- std::runtime_error);
+ MyGrate::Output::Pq::PqErr);
MyGrate::Output::Pq::PqConn c {CONNSTR};
BOOST_CHECK_NO_THROW(c.query("SET application_name = ''"));
BOOST_CHECK_NO_THROW(c.query("SET application_name = 'something'"));
- BOOST_CHECK_THROW(c.query("SET application_name = "), std::runtime_error);
+ BOOST_CHECK_THROW(c.query("SET application_name = "), MyGrate::Output::Pq::PqErr);
// BOOST_CHECK_THROW(c.query("SET application_name = $1", {}), std::logic_error);
BOOST_CHECK_NO_THROW(c.query("SET application_name = 'something'", {}));
c.query("DROP TABLE IF EXISTS test");
@@ -35,7 +35,7 @@ BOOST_AUTO_TEST_CASE(simple)
BOOST_CHECK_NO_THROW(c.query("INSERT INTO test VALUES($1)", {"string_view"}));
BOOST_CHECK_NO_THROW(c.query("INSERT INTO test VALUES($1)", {nullptr}));
BOOST_CHECK_NO_THROW(c.query("INSERT INTO test VALUES($1)", {1.2}));
- BOOST_CHECK_THROW(c.query("INSERT INTO test VALUES($1)", {MyGrate::Time {}}), std::runtime_error);
+ BOOST_CHECK_THROW(c.query("INSERT INTO test VALUES($1)", {MyGrate::Time {}}), std::logic_error);
c.query("DROP TABLE test");
}