Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
TestAssert.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
20
21namespace shamtest::details {
22
24 struct TestAssert {
25 bool value;
26 std::string name;
27 std::string comment;
28
30 std::string serialize_json();
31
33 void serialize(std::basic_stringstream<byte> &stream);
34
36 static TestAssert deserialize(std::basic_stringstream<byte> &reader);
37 };
38
39} // namespace shamtest::details
Source location utility.
implementation details of the test library
Definition DataNode.hpp:23
std::string serialize_json()
Serialize the assertion in JSON.
std::string comment
Comment attached to the assert.
bool value
Value of the assert.
void serialize(std::basic_stringstream< byte > &stream)
Serialize the assertion in binary format.
std::string name
Name of the assert.
static TestAssert deserialize(std::basic_stringstream< byte > &reader)
DeSerialize the assertion from binary format.