diff --git a/config/src/tests/api/CMakeLists.txt b/config/src/tests/api/CMakeLists.txt index 5bca0bf8bf1..9dd2c346c5b 100644 --- a/config/src/tests/api/CMakeLists.txt +++ b/config/src/tests/api/CMakeLists.txt @@ -4,6 +4,7 @@ vespa_add_executable(config_api_test_app TEST api.cpp DEPENDS vespa_config + GTest::gtest ) vespa_add_test(NAME config_api_test_app COMMAND config_api_test_app) vespa_generate_config(config_api_test_app ../../test/resources/configdefinitions/my.def) diff --git a/config/src/tests/api/api.cpp b/config/src/tests/api/api.cpp index 1546990bc5d..b5db1389f9f 100644 --- a/config/src/tests/api/api.cpp +++ b/config/src/tests/api/api.cpp @@ -1,12 +1,13 @@ // Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include #include #include #include +#include using namespace config; -TEST("require that can subscribe with empty config id") { +TEST(ConfigApiTest, require_that_can_subscribe_with_empty_config_id) +{ ConfigSet set; auto ctx = std::make_shared(set); MyConfigBuilder builder; @@ -17,7 +18,7 @@ TEST("require that can subscribe with empty config id") { ASSERT_TRUE(subscriber.nextConfigNow()); std::unique_ptr cfg(handle->getConfig()); ASSERT_TRUE(cfg); - ASSERT_EQUAL("myfoo", cfg->myField); + ASSERT_EQ("myfoo", cfg->myField); } -TEST_MAIN() { TEST_RUN_ALL(); } +GTEST_MAIN_RUN_ALL_TESTS()