![]() |
Shamrock 2025.10.0
Astrophysical Code
|
namespace containing stuff related to the test library More...
Namespaces | |
| namespace | details |
| implementation details of the test library | |
Classes | |
| struct | TestConfig |
| Configuration of the test runner. More... | |
Functions | |
| void | _start_test_print (details::Test &test, u32 test_num, u32 test_count) |
| print the line in terminal when a test start | |
| void | _end_test_print (std::vector< details::TestResult > &rank_results, shambase::Timer &timer) |
| print the line in terminal when a test ends | |
| bool | is_test_failed (details::TestResult &res) |
| check is a test is failed | |
| std::string | gen_fail_log (details::TestResult &res) |
| Generate a failure log at the end of the tests. | |
| void | _print_summary (std::vector< details::TestResult > &results) |
| Print summary of the test run. | |
| std::vector< details::TestResult > | gather_tests (std::vector< details::TestResult > rank_result, usize &gather_bytecount) |
| Gather test results from all MPI ranks. | |
| void | print_test_list () |
| print all the available tests | |
| void | write_json_report (std::vector< details::TestResult > &results, std::string outfile) |
| Write the JSON report. | |
| void | write_tex_report (std::vector< details::TestResult > &results, bool mark_fail) |
| Write the tex report. | |
| std::vector< u32 > | select_print_tests (TestConfig cfg) |
| int | run_all_tests (int argc, char *argv[], TestConfig cfg) |
| run all the tests | |
| void | gen_test_list (std::string_view outfile) |
| output test list to a file | |
| shamtest::details::TestAssertList & | asserts () |
| current test asserts | |
| shamtest::details::TestDataList & | test_data () |
| current test data | |
| std::string & | test_tex_out () |
| Get current tex output from a test. | |
Variables | |
| bool | is_run_only = false |
| Is in run only mode. | |
| bool | is_full_output_mode = false |
| Is in full output mode. | |
namespace containing stuff related to the test library
namespace for the test system
| void shamtest::_end_test_print | ( | std::vector< details::TestResult > & | rank_results, |
| shambase::Timer & | timer ) |
print the line in terminal when a test ends
| res | |
| timer |
Definition at line 84 of file shamtest.cpp.
| void shamtest::_print_summary | ( | std::vector< details::TestResult > & | results | ) |
Print summary of the test run.
| results |
Definition at line 198 of file shamtest.cpp.
| void shamtest::_start_test_print | ( | details::Test & | test, |
| u32 | test_num, | ||
| u32 | test_count ) |
print the line in terminal when a test start
| test | |
| test_num | |
| test_count |
Definition at line 58 of file shamtest.cpp.
|
inline |
current test asserts
Definition at line 104 of file shamtest.hpp.
| std::vector< details::TestResult > shamtest::gather_tests | ( | std::vector< details::TestResult > | rank_result, |
| usize & | gather_bytecount ) |
Gather test results from all MPI ranks.
Definition at line 239 of file shamtest.cpp.
| std::string shamtest::gen_fail_log | ( | details::TestResult & | res | ) |
Generate a failure log at the end of the tests.
| res |
Definition at line 163 of file shamtest.cpp.
| void shamtest::gen_test_list | ( | std::string_view | outfile | ) |
output test list to a file
Definition at line 586 of file shamtest.cpp.
| bool shamtest::is_test_failed | ( | details::TestResult & | res | ) |
check is a test is failed
| res |
Definition at line 146 of file shamtest.cpp.
| void shamtest::print_test_list | ( | ) |
print all the available tests
Definition at line 274 of file shamtest.cpp.
| int shamtest::run_all_tests | ( | int | argc, |
| char * | argv[], | ||
| TestConfig | cfg ) |
run all the tests
| argc | main argc |
| argv | main argv |
| cfg | test run configuration |
Definition at line 486 of file shamtest.cpp.
| std::vector< u32 > shamtest::select_print_tests | ( | TestConfig | cfg | ) |
Definition at line 378 of file shamtest.cpp.
|
inline |
current test data
Definition at line 113 of file shamtest.hpp.
|
inline |
Get current tex output from a test.
Definition at line 118 of file shamtest.hpp.
| void shamtest::write_json_report | ( | std::vector< details::TestResult > & | results, |
| std::string | outfile ) |
Write the JSON report.
Definition at line 316 of file shamtest.cpp.
| void shamtest::write_tex_report | ( | std::vector< details::TestResult > & | results, |
| bool | mark_fail ) |
Write the tex report.
Definition at line 365 of file shamtest.cpp.
| bool shamtest::is_full_output_mode = false |
Is in full output mode.
Definition at line 49 of file shamtest.cpp.
| bool shamtest::is_run_only = false |
Is in run only mode.
Definition at line 48 of file shamtest.cpp.