8#include <boost/archive/binary_iarchive.hpp>
9#include <boost/archive/binary_oarchive.hpp>
12#include "gtest/gtest-spi.h"
13#include "gtest/gtest.h"
18TEST(_GTestCbmStsDigi, CheckDefaultConstructor)
34TEST(_GTestCbmStsDigi, CheckStandardConstructor)
46TEST(_GTestCbmStsDigi, CheckCopyConstructor)
64TEST(_GTestCbmStsDigi, CheckAssignmentOperator)
84TEST(_GTestCbmStsDigi, CheckMoveConstructor)
101TEST(_GTestCbmStsDigi, CheckAssignmentMoveConstructor)
110 test2 = std::move(test);
119TEST(_GTestCbmStsDigi, CheckSetTime)
131TEST(_GTestCbmStsDigi, CheckToString)
137 std::string expected =
138 "StsDigi: address " + std::to_string(
kTestAddress) +
" | channel 42 | charge 23 | time 987654321";
140 EXPECT_STREQ(expected.c_str(), test.
ToString().c_str());
144TEST(_GTestCbmStsDigi, CheckGetClassName)
153TEST(_GTestCbmStsDigi, CheckSerialization)
157 boost::archive::binary_oarchive outArchive(s);
160 boost::archive::binary_iarchive inArchive(s);
@ kSts
Silicon Tracking System.
static const int32_t kTestAddress
TEST(_GTestCbmStsDigi, CheckDefaultConstructor)
Data class for a single-channel message in the STS.
std::string ToString() const
XPU_D void SetTime(uint32_t dNewTime)
static const char * GetClassName()
Class name (static)
void compareStsDigiDataMembers(CbmStsDigi &test, int32_t address, uint16_t charge, uint16_t channel, ECbmModuleId systemid, int64_t time)
int32_t GetAddress(uint32_t unit=0, uint32_t ladder=0, uint32_t halfladder=0, uint32_t module=0, uint32_t sensor=0, uint32_t side=0, uint32_t version=kCurrentVersion)
Construct address.