// Verifies that v4 class lease counts are correctly adjusted
// when leases have class lists.
TEST_F(PgSqlLeaseMgrTest, classLeaseCount4) {
- if (!LeaseMgrFactory::instance().isJsonSupported()) {
- std::cout << "Skipped test because of lack of JSON support in the database." << std::endl;
- return;
- }
-
+ SKIP_IF(!LeaseMgrFactory::instance().isJsonSupported());
testClassLeaseCount4();
}
// Verifies that v6 IA_NA class lease counts are correctly adjusted
// when leases have class lists.
TEST_F(PgSqlLeaseMgrTest, classLeaseCount6_NA) {
- if (!LeaseMgrFactory::instance().isJsonSupported()) {
- std::cout << "Skipped test because of lack of JSON support in the database." << std::endl;
- return;
- }
-
+ SKIP_IF(!LeaseMgrFactory::instance().isJsonSupported());
testClassLeaseCount6(Lease::TYPE_NA);
}
// Verifies that v6 IA_PD class lease counts are correctly adjusted
// when leases have class lists.
TEST_F(PgSqlLeaseMgrTest, classLeaseCount6_PD) {
- if (!LeaseMgrFactory::instance().isJsonSupported()) {
- std::cout << "Skipped test because of lack of JSON support in the database." << std::endl;
- return;
- }
-
+ SKIP_IF(!LeaseMgrFactory::instance().isJsonSupported());
testClassLeaseCount6(Lease::TYPE_PD);
}
/// if the given expression is true. This works around the lack of
/// GTEST_SKIP prior to googletest 1.10.
///
-/// @note This macro cannot be used in ::testingL:Test::SetUp()
+/// @note This macro cannot be used in ::testing::Test::SetUp()
/// to skip tests (unless running with googletest 1.10 or later).
/// It must be used directly within the body of each unit test.
///
if (expression) { \
const auto info = ::testing::UnitTest::GetInstance()->current_test_info(); \
std::cerr << "SKIPPING: " << info->test_case_name() << ":" << info->name() \
- << ":" << #expression << " is true" << std::endl; \
+ << ": '" << #expression << "' is true" << std::endl; \
return; \
} \
}
if (expression) { \
const auto info = ::testing::UnitTest::GetInstance()->current_test_info(); \
GTEST_SKIP() << "SKIPPING: " << info->test_case_name() << ":" << info->name() \
- << ":" << #expression << " is true"; \
+ << ": '" << #expression << "' is true"; \
} \
}
#endif