test(tests/probe): logging module test suite started
This commit is contained in:
13
tests/probe/loggerTest.cpp
Normal file
13
tests/probe/loggerTest.cpp
Normal file
@@ -0,0 +1,13 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include "logger.h"
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <set>
|
||||
#include <sstream>
|
||||
|
||||
class loggerTest : public ::testing::Test {};
|
||||
|
||||
TEST_F(loggerTest, DefaultConstructor) {
|
||||
EXPECT_NO_THROW(Logger::getInstance("test.log"));
|
||||
}
|
||||
22
tests/probe/meson.build
Normal file
22
tests/probe/meson.build
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user