mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2024-12-21 05:53:09 +00:00
25 lines
445 B
C++
25 lines
445 B
C++
|
#include <pqxx/transaction>
|
||
|
|
||
|
#include "test_helpers.hxx"
|
||
|
|
||
|
using namespace pqxx;
|
||
|
|
||
|
|
||
|
// Simple test program for libpqxx. Issue invalid query and handle error.
|
||
|
namespace
|
||
|
{
|
||
|
void test_056()
|
||
|
{
|
||
|
connection conn;
|
||
|
work tx{conn};
|
||
|
quiet_errorhandler d(conn);
|
||
|
|
||
|
PQXX_CHECK_THROWS(
|
||
|
tx.exec("DELIBERATELY INVALID TEST QUERY..."), sql_error,
|
||
|
"SQL syntax error did not raise expected exception.");
|
||
|
}
|
||
|
|
||
|
|
||
|
PQXX_REGISTER_TEST(test_056);
|
||
|
} // namespace
|