Shamrock
2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
shamtest
details
Test.hpp
Go to the documentation of this file.
1
// -------------------------------------------------------//
2
//
3
// SHAMROCK code for hydrodynamics
4
// Copyright (c) 2021-2026 Timothée David--Cléris <tim.shamrock@proton.me>
5
// SPDX-License-Identifier: CeCILL Free Software License Agreement v2.1
6
// Shamrock is licensed under the CeCILL 2.1 License, see LICENSE for more information
7
//
8
// -------------------------------------------------------//
9
10
#pragma once
11
18
#include "
TestResult.hpp
"
19
20
namespace
shamtest::details
{
21
23
extern
TestResult
current_test
;
24
26
struct
Test
{
27
TestType
type
;
28
std::string
name
;
29
i32
node_count
;
30
void (*
test_functor
)();
31
33
inline
Test
(
const
TestType
&
type
, std::string
name
,
const
i32
&
node_count
,
void
(*func)())
34
:
type
(
type
),
name
(
std
::move(
name
)),
node_count
(
node_count
),
test_functor
(func) {}
35
37
TestResult
run
();
38
};
39
40
}
// namespace shamtest::details
TestResult.hpp
header describing return type of a test, and the type of the test
TestType
TestType
Describe the type of the performed test.
Definition
TestResult.hpp:27
i32
std::int32_t i32
32 bit integer
Definition
aliases_int.hpp:23
shamtest::details
implementation details of the test library
Definition
DataNode.hpp:23
shamtest::details::current_test
TestResult current_test
Current test being run.
Definition
Test.cpp:22
std
STL namespace.
shamtest::details::TestResult
Result of a test.
Definition
TestResult.hpp:34
shamtest::details::Test
Informations about a test.
Definition
Test.hpp:26
shamtest::details::Test::node_count
i32 node_count
Node count of the test.
Definition
Test.hpp:29
shamtest::details::Test::run
TestResult run()
Run the test.
Definition
Test.cpp:24
shamtest::details::Test::test_functor
void(* test_functor)()
Test function.
Definition
Test.hpp:30
shamtest::details::Test::Test
Test(const TestType &type, std::string name, const i32 &node_count, void(*func)())
CTOR of the test.
Definition
Test.hpp:33
shamtest::details::Test::name
std::string name
Name of the test.
Definition
Test.hpp:28
shamtest::details::Test::type
TestType type
Type of test.
Definition
Test.hpp:27
Generated on Wed May 13 2026 13:21:49 for Shamrock by
1.9.8