test(tests/const): added const unit tests

This commit is contained in:
2025-02-11 18:02:22 -05:00
parent 795ee2e3bf
commit ba4937cdbd
2 changed files with 129 additions and 0 deletions

22
tests/const/meson.build Normal file
View File

@@ -0,0 +1,22 @@
# Test files for const
test_sources = [
'constTest.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,
include_directories: include_directories('../../src/const/public'),
link_with: libconst, # Link the dobj library
install_rpath: '@loader_path/../../src' # Ensure runtime library path resolves correctly
)
# Add the executable as a test
test(exe_name, test_exe)
endforeach