mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2024-12-28 16:58:51 +00:00
24 lines
515 B
C++
24 lines
515 B
C++
|
#include "../test_helpers.hxx"
|
||
|
|
||
|
#include <pqxx/util>
|
||
|
|
||
|
namespace
|
||
|
{
|
||
|
void test_thread_safety_model()
|
||
|
{
|
||
|
auto const model{pqxx::describe_thread_safety()};
|
||
|
|
||
|
if (model.safe_libpq and model.safe_kerberos)
|
||
|
PQXX_CHECK_EQUAL(
|
||
|
model.description, "",
|
||
|
"Thread-safety looks okay but model description is nonempty.");
|
||
|
else
|
||
|
PQXX_CHECK_NOT_EQUAL(
|
||
|
model.description, "",
|
||
|
"Thread-safety model is imperfect but lacks description.");
|
||
|
}
|
||
|
|
||
|
|
||
|
PQXX_REGISTER_TEST(test_thread_safety_model);
|
||
|
} // namespace
|