Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
TestResult.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
21#include <utility>
22#include <vector>
23
27enum TestType { Benchmark, LongBenchmark, ValidationTest, LongValidationTest, Unittest };
28
29namespace shamtest::details {
30
34 struct TestResult {
36 std::string name;
40 std::string tex_output;
49 inline TestResult(const TestType &type, std::string name, const u32 &world_rank)
51
53 inline TestResult(
55 std::string name,
59 std::string tex_output)
63
65 std::string serialize_json();
67 void serialize(std::basic_stringstream<byte> &stream);
69 static TestResult deserialize(std::basic_stringstream<byte> &reader);
70 };
71
72} // namespace shamtest::details
TestType
Describe the type of the performed test.
std::uint32_t u32
32 bit unsigned integer
implementation details of the test library
Definition DataNode.hpp:23
STL namespace.
Class to hold the list of assertion related to a test.
List of data generated by a test.
static TestResult deserialize(std::basic_stringstream< byte > &reader)
DeSerialize the assertion from binary format.
std::string serialize_json()
Serialize the assertion in JSON.
TestResult(const TestType &type, std::string name, const u32 &world_rank)
Constructructor.
TestResult(TestType type, std::string name, u32 world_rank, TestAssertList &&asserts, TestDataList &&test_data, std::string tex_output)
CTOR of a test result.
void serialize(std::basic_stringstream< byte > &stream)
Serialize the assertion in binary format.