Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
shamtest::details Namespace Reference

implementation details of the test library More...

Classes

struct  DataNode
 Data node generated by the test. More...
struct  Test
 Informations about a test. More...
struct  TestAssert
 A test assertion. More...
struct  TestAssertList
 Class to hold the list of assertion related to a test. More...
struct  TestData
 < Test data More...
struct  TestDataList
 List of data generated by a test. More...
struct  TestResult
 Result of a test. More...
struct  TestStaticInit
 helper class to statically register tests More...

Functions

std::string serialize_vec (const std::vector< f64 > &vec)
void add_unittest_section (std::stringstream &output, std::vector< TestResult > &results)
 Add the unittest section to the Tex report.
void add_tex_output_section (std::stringstream &output, std::vector< TestResult > &results)
 Add tex outputs from the tests to the report.
void add_queue_section (std::stringstream &output, sycl::queue &q)
 Document details about the SYCL queues status in the report.
void add_config_section (std::stringstream &output)
 Document details about the Shamrock status in the report.
std::string make_test_report_tex (std::vector< TestResult > &results, bool mark_fail)
 Make the tex report.
std::string format_assert_name (std::string s)
 Format a string that is an assert name.

Variables

TestResult current_test {Unittest, "", 0}
 Current test being run.
std::vector< Teststatic_init_vec_tests {}
 Static init vector containing the list of all the tests in the code see : programming guide : Static init function registering.

Detailed Description

implementation details of the test library

Function Documentation

◆ add_config_section()

void shamtest::details::add_config_section ( std::stringstream & output)

Document details about the Shamrock status in the report.

Definition at line 239 of file texTestReport.cpp.

◆ add_queue_section()

void shamtest::details::add_queue_section ( std::stringstream & output,
sycl::queue & q )

Document details about the SYCL queues status in the report.

Definition at line 214 of file texTestReport.cpp.

◆ add_tex_output_section()

void shamtest::details::add_tex_output_section ( std::stringstream & output,
std::vector< TestResult > & results )

Add tex outputs from the tests to the report.

Definition at line 196 of file texTestReport.cpp.

◆ add_unittest_section()

void shamtest::details::add_unittest_section ( std::stringstream & output,
std::vector< TestResult > & results )

Add the unittest section to the Tex report.

Definition at line 101 of file texTestReport.cpp.

Here is the call graph for this function:

◆ format_assert_name()

std::string shamtest::details::format_assert_name ( std::string s)
inline

Format a string that is an assert name.

If the string is empty, returns an empty string Otherwise, returns the string with " | " appended

Definition at line 175 of file shamtest.hpp.

◆ make_test_report_tex()

std::string shamtest::details::make_test_report_tex ( std::vector< TestResult > & results,
bool mark_fail )

Make the tex report.

Make a tex report from the list of test results.

Parameters
results
mark_fail
Returns
std::string

Definition at line 290 of file texTestReport.cpp.

◆ serialize_vec()

std::string shamtest::details::serialize_vec ( const std::vector< f64 > & vec)

Definition at line 22 of file DataNode.cpp.

Variable Documentation

◆ current_test

TestResult shamtest::details::current_test {Unittest, "", 0}

Current test being run.

the test currently running

Definition at line 22 of file Test.cpp.

◆ static_init_vec_tests

std::vector<Test> shamtest::details::static_init_vec_tests {}
inline

Static init vector containing the list of all the tests in the code see : programming guide : Static init function registering.

Definition at line 37 of file shamtest.hpp.