test(tests/poly): added very basic polytrope test suite
Currently only tests default constructor
This commit is contained in:
@@ -7,6 +7,7 @@ subdir('dobj')
|
|||||||
subdir('const')
|
subdir('const')
|
||||||
subdir('opatIO')
|
subdir('opatIO')
|
||||||
subdir('meshIO')
|
subdir('meshIO')
|
||||||
|
subdir('poly')
|
||||||
|
|
||||||
# Subdirectories for sandbox tests
|
# Subdirectories for sandbox tests
|
||||||
subdir('dobj_sandbox')
|
subdir('dobj_sandbox')
|
||||||
|
|||||||
20
tests/poly/meson.build
Normal file
20
tests/poly/meson.build
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# Test files for const
|
||||||
|
test_sources = [
|
||||||
|
'polyTest.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, polysolver_dep],
|
||||||
|
install_rpath: '@loader_path/../../src' # Ensure runtime library path resolves correctly
|
||||||
|
)
|
||||||
|
|
||||||
|
# Add the executable as a test
|
||||||
|
test(exe_name, test_exe)
|
||||||
|
endforeach
|
||||||
9
tests/poly/polyTest.cpp
Normal file
9
tests/poly/polyTest.cpp
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
#include "polySolver.h"
|
||||||
|
|
||||||
|
class polyTest : public ::testing::Test {};
|
||||||
|
|
||||||
|
TEST_F(polyTest, DefaultConstructor) {
|
||||||
|
EXPECT_NO_THROW(PolySolver(1, 1));
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user