Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
TestDataList.cpp
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
16#include "TestDataList.hpp"
18#include "shambase/string.hpp"
19#include <sstream>
20
21namespace shamtest::details {
22
24 std::string acc = "\n[\n";
25
26 for (u32 i = 0; i < test_data.size(); i++) {
28 if (i < test_data.size() - 1) {
29 acc += ",";
30 }
31 }
32
33 acc += "\n]";
34 return acc;
35 }
36
37 void TestDataList::serialize(std::basic_stringstream<byte> &stream) {
39 }
40 TestDataList TestDataList::deserialize(std::basic_stringstream<byte> &stream) {
41 TestDataList out;
42
44
45 return {};
46 }
47
48} // namespace shamtest::details
std::uint32_t u32
32 bit unsigned integer
void stream_read_vector(std::basic_stringstream< byte > &stream, std::vector< T > &vec)
read a vector from the bytestream Note : this appends read objects to the vector without resetting it
std::string increase_indent(std::string in, std::string delim="\n ")
Increase indentation of a string.
Definition string.hpp:197
void stream_write_vector(std::basic_stringstream< byte > &stream, std::vector< T > &vec)
write the vector into the bytestream
implementation details of the test library
Definition DataNode.hpp:23
List of data generated by a test.
std::string serialize_json()
Serialize the assertion in JSON.
std::vector< TestData > test_data
Held test data.
void serialize(std::basic_stringstream< byte > &stream)
Serialize the assertion in binary format.
static TestDataList deserialize(std::basic_stringstream< byte > &reader)
DeSerialize the assertion from binary format.