Fix the backend test
Test / build (push) Successful in 54s

This commit is contained in:
2026-05-20 17:53:57 +02:00
parent c04278ff84
commit 76985de795
7 changed files with 76 additions and 115 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ foreach(test_source ${KATJA_TEST_SOURCES})
add_executable(${tester} ${test_source})
target_compile_definitions(${tester} PRIVATE "BOOST_TEST_DYN_LINK=1")
target_link_libraries(${tester} PRIVATE katja Boost::unit_test_framework)
target_link_libraries(${tester} PRIVATE katja backend Boost::unit_test_framework)
add_test(NAME ${test_name} COMMAND ${tester})
endforeach()
+21
View File
@@ -0,0 +1,21 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
#define BOOST_TEST_MODULE slackpkg tests
#include <boost/test/unit_test.hpp>
import katja.slackpkg;
BOOST_AUTO_TEST_CASE(slack_test_slackpkg_construct)
{
auto slackpkg = new katja::Slackpkg("some", "mirror", 1, nullptr, nullptr);
BOOST_TEST(slackpkg->name == "some");
BOOST_TEST(slackpkg->mirror == "mirror");
BOOST_TEST(slackpkg->order == 1);
BOOST_TEST(!slackpkg->is_blacklisted("pattern"));
delete slackpkg;
}