diff --git a/config/src/tests/configformat/CMakeLists.txt b/config/src/tests/configformat/CMakeLists.txt index f660cb9b151..241c73d3c4a 100644 --- a/config/src/tests/configformat/CMakeLists.txt +++ b/config/src/tests/configformat/CMakeLists.txt @@ -1,9 +1,10 @@ # Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. vespa_add_executable(config_configformat_test_app TEST SOURCES - configformat.cpp + configformat_test.cpp DEPENDS vespa_config + GTest::gtest ) vespa_add_test(NAME config_configformat_test_app COMMAND config_configformat_test_app) vespa_generate_config(config_configformat_test_app ../../test/resources/configdefinitions/my.def) diff --git a/config/src/tests/configformat/configformat.cpp b/config/src/tests/configformat/configformat_test.cpp similarity index 74% rename from config/src/tests/configformat/configformat.cpp rename to config/src/tests/configformat/configformat_test.cpp index 1466ed6b15d..968db03ee93 100644 --- a/config/src/tests/configformat/configformat.cpp +++ b/config/src/tests/configformat/configformat_test.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 using namespace config; using namespace vespalib::slime::convenience; -TEST("requireThatConfigIsFormatted") { +TEST(ConfigFormatTest, requireThatConfigIsFormatted) +{ ConfigDataBuffer buffer; vespalib::Slime & slime(buffer.slimeObject()); Cursor &c = slime.setObject().setObject("configPayload").setObject("myField"); @@ -15,7 +16,7 @@ TEST("requireThatConfigIsFormatted") { FileConfigFormatter formatter; formatter.encode(buffer); - EXPECT_EQUAL(std::string("myField \"foo\"\n"), buffer.getEncodedString()); + EXPECT_EQ(std::string("myField \"foo\"\n"), buffer.getEncodedString()); } -TEST_MAIN() { TEST_RUN_ALL(); } +GTEST_MAIN_RUN_ALL_TESTS()