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
7
#include "
compareErrorMessage.h
"
8
#include "gtest/gtest-spi.h"
9
#include "gtest/gtest.h"
10
11
TEST
(_GTestCbmErrorMessage, CheckDefaultConstructor)
12
{
13
CbmErrorMessage
test;
14
{
15
SCOPED_TRACE(
"CheckDefaultConstructor"
);
16
compareErrorMessageDataMembers
(test,
ECbmModuleId::kLastModule
, -1.0, 0, 0, 0);
17
}
18
}
19
20
TEST
(_GTestCbmErrorMessage, CheckStandardConstructor)
21
{
22
CbmErrorMessage
test {
ECbmModuleId::kLastModule
, -1.0, 0, 0};
23
{
24
SCOPED_TRACE(
"CheckStandardConstructor"
);
25
compareErrorMessageDataMembers
(test,
ECbmModuleId::kLastModule
, -1.0, 0, 0, 0);
26
}
27
}
28
29
TEST
(_GTestCbmErrorMessage, CheckStandardConstructorWithPayload)
30
{
31
CbmErrorMessage
test {
ECbmModuleId::kLastModule
, -1.0, 0, 0, 0};
32
{
33
SCOPED_TRACE(
"CheckStandardConstructorWithPayload"
);
34
compareErrorMessageDataMembers
(test,
ECbmModuleId::kLastModule
, -1.0, 0, 0, 0);
35
}
36
}
37
38
TEST
(_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
}
ECbmModuleId::kLastModule
@ kLastModule
For loops over all modules.
ECbmModuleId::kRef
@ kRef
Reference plane.
CbmErrorMessage.h
TEST
TEST(_GTestCbmErrorMessage, CheckDefaultConstructor)
Definition
_GTestCbmErrorMessage.cxx:11
CbmErrorMessage
CbmRoot (+externals) headers.
Definition
CbmErrorMessage.h:44
compareErrorMessage.h
compareErrorMessageDataMembers
void compareErrorMessageDataMembers(CbmErrorMessage &test, ECbmModuleId sysId, double dTime, uint32_t uAddress, uint32_t uFlags, uint32_t uPayload)
Definition
compareErrorMessage.h:12
core
data
test
_GTestCbmErrorMessage.cxx
Generated on Sun Dec 22 2024 23:04:08 for CbmRoot by
1.12.0