CbmRoot
Loading...
Searching...
No Matches
_GTestCbmErrorMessage.cxx
Go to the documentation of this file.
1/* Copyright (C) 2020 Facility for Antiproton and Ion Research in Europe, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Pierre-Alain Loizeau [committer] */
4
5#include "CbmErrorMessage.h"
6
8#include "gtest/gtest-spi.h"
9#include "gtest/gtest.h"
10
11TEST(_GTestCbmErrorMessage, CheckDefaultConstructor)
12{
13 CbmErrorMessage test;
14 {
15 SCOPED_TRACE("CheckDefaultConstructor");
17 }
18}
19
20TEST(_GTestCbmErrorMessage, CheckStandardConstructor)
21{
23 {
24 SCOPED_TRACE("CheckStandardConstructor");
26 }
27}
28
29TEST(_GTestCbmErrorMessage, CheckStandardConstructorWithPayload)
30{
31 CbmErrorMessage test {ECbmModuleId::kLastModule, -1.0, 0, 0, 0};
32 {
33 SCOPED_TRACE("CheckStandardConstructorWithPayload");
35 }
36}
37
38TEST(_GTestCbmErrorMessage, CheckToString)
39{
40 CbmErrorMessage test {ECbmModuleId::kRef, -1.1, 0, 0, 0};
41 EXPECT_STREQ("Error message: System 0 | time -1.1 | address 0 | flags "
42 "0x00000000 | fulPayload 0x00000000",
43 test.ToString().c_str());
44}
@ kLastModule
For loops over all modules.
@ kRef
Reference plane.
TEST(_GTestCbmErrorMessage, CheckDefaultConstructor)
CbmRoot (+externals) headers.
void compareErrorMessageDataMembers(CbmErrorMessage &test, ECbmModuleId sysId, double dTime, uint32_t uAddress, uint32_t uFlags, uint32_t uPayload)