feat(composition): added composition module stub
This commit is contained in:
21
tests/composition/compositionTest.cpp
Normal file
21
tests/composition/compositionTest.cpp
Normal file
@@ -0,0 +1,21 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <string>
|
||||
#include <algorithm>
|
||||
|
||||
#include "atomicSpecies.h"
|
||||
|
||||
std::string EXAMPLE_FILENAME = std::string(getenv("MESON_SOURCE_ROOT")) + "/tests/composition/example.yaml";
|
||||
|
||||
/**
|
||||
* @brief Test suite for the composition class.
|
||||
*/
|
||||
class compositionTest : public ::testing::Test {};
|
||||
|
||||
/**
|
||||
* @brief Test the constructor of the composition class.
|
||||
*/
|
||||
TEST_F(compositionTest, constructor) {
|
||||
std::cout << "Testing the constructor of the composition class." << std::endl;
|
||||
std::cout << chemSpecies::species.at("H-1") << std::endl;
|
||||
}
|
||||
|
||||
23
tests/composition/meson.build
Normal file
23
tests/composition/meson.build
Normal file
@@ -0,0 +1,23 @@
|
||||
# Test files for const
|
||||
test_sources = [
|
||||
'compositionTest.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, species_weight_dep, gtest_main],
|
||||
install_rpath: '@loader_path/../../src' # Ensure runtime library path resolves correctly
|
||||
)
|
||||
|
||||
# Add the executable as a test
|
||||
test(
|
||||
exe_name,
|
||||
test_exe,
|
||||
env: ['MESON_SOURCE_ROOT=' + meson.project_source_root(), 'MESON_BUILD_ROOT=' + meson.project_build_root()])
|
||||
endforeach
|
||||
@@ -13,6 +13,7 @@ subdir('probe')
|
||||
subdir('eos')
|
||||
subdir('resource')
|
||||
subdir('network')
|
||||
subdir('composition')
|
||||
|
||||
# Subdirectories for sandbox tests
|
||||
subdir('dobj_sandbox')
|
||||
|
||||
Reference in New Issue
Block a user