CbmRoot
_GTestCbmErrorMessage.cxx
Go to the documentation of this file.
1 #include "CbmErrorMessage.h"
2 
3 #include "gtest/gtest-spi.h"
4 #include "gtest/gtest.h"
5 
6 #include "compareErrorMessage.h"
7 
8 TEST(_GTestCbmErrorMessage, CheckDefaultConstructor) {
9  CbmErrorMessage test;
10  {
11  SCOPED_TRACE("CheckDefaultConstructor");
13  test, ECbmModuleId::kLastModule, -1.0, 0, 0, 0);
14  }
15 }
16 
17 TEST(_GTestCbmErrorMessage, CheckStandardConstructor) {
18  CbmErrorMessage test {ECbmModuleId::kLastModule, -1.0, 0, 0};
19  {
20  SCOPED_TRACE("CheckStandardConstructor");
22  test, ECbmModuleId::kLastModule, -1.0, 0, 0, 0);
23  }
24 }
25 
26 TEST(_GTestCbmErrorMessage, CheckStandardConstructorWithPayload) {
27  CbmErrorMessage test {ECbmModuleId::kLastModule, -1.0, 0, 0, 0};
28  {
29  SCOPED_TRACE("CheckStandardConstructorWithPayload");
31  test, ECbmModuleId::kLastModule, -1.0, 0, 0, 0);
32  }
33 }
34 
35 TEST(_GTestCbmErrorMessage, CheckToString) {
36  CbmErrorMessage test {ECbmModuleId::kRef, -1.1, 0, 0, 0};
37  EXPECT_STREQ("Error message: System 0 | time -1.1 | address 0 | flags "
38  "0x00000000 | fulPayload 0x00000000",
39  test.ToString().c_str());
40 }
compareErrorMessage.h
CbmErrorMessage.h
CbmErrorMessage
CbmRoot (+externals) headers.
Definition: CbmErrorMessage.h:39
ECbmModuleId::kRef
@ kRef
Reference plane.
TEST
TEST(_GTestCbmErrorMessage, CheckDefaultConstructor)
Definition: _GTestCbmErrorMessage.cxx:8
compareErrorMessageDataMembers
void compareErrorMessageDataMembers(CbmErrorMessage &test, ECbmModuleId sysId, Double_t dTime, UInt_t uAddress, UInt_t uFlags, UInt_t uPayload)
Definition: compareErrorMessage.h:6
ECbmModuleId::kLastModule
@ kLastModule
For loops over all modules.