diff --git a/tests/probe/loggerTest.cpp b/tests/probe/loggerTest.cpp new file mode 100644 index 0000000..fb6f42e --- /dev/null +++ b/tests/probe/loggerTest.cpp @@ -0,0 +1,13 @@ +#include +#include "logger.h" +#include +#include +#include +#include +#include + +class loggerTest : public ::testing::Test {}; + +TEST_F(loggerTest, DefaultConstructor) { + EXPECT_NO_THROW(Logger::getInstance("test.log")); +} \ No newline at end of file diff --git a/tests/probe/meson.build b/tests/probe/meson.build new file mode 100644 index 0000000..c1f1f7d --- /dev/null +++ b/tests/probe/meson.build @@ -0,0 +1,22 @@ +# Test files for dobj +test_sources = [ + 'loggerTest.cpp', + # 'DObjectTest.cpp', + # 'LockableDObjectTest.cpp' +] + +foreach test_file : test_sources + exe_name = test_file.split('.')[0] + message('Building test: ' + exe_name) + + # Create an executable target for each test + test_exe = executable( + exe_name, + test_file, + dependencies: [gtest_dep, logger_dep], + install_rpath: '@loader_path/../../src' # Ensure runtime library path resolves correctly + ) + + # Add the executable as a test + test(exe_name, test_exe) +endforeach