CbmRoot
Loading...
Searching...
No Matches
compareErrorMessage.h
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#ifndef COMPAREERRORMESSAGE_H
6#define COMPAREERRORMESSAGE_H 1
7
8#include "CbmErrorMessage.h"
9
10#include "gtest/gtest.h"
11
12void compareErrorMessageDataMembers(CbmErrorMessage& test, ECbmModuleId sysId, double dTime, uint32_t uAddress,
13 uint32_t uFlags, uint32_t uPayload)
14{
15 EXPECT_EQ(sysId, test.GetSystemId());
16 EXPECT_EQ(uAddress, test.GetAddress());
17 EXPECT_EQ(uFlags, test.GetFlags());
18 EXPECT_EQ(uPayload, test.GetPayload());
19 EXPECT_DOUBLE_EQ(dTime, test.GetTime());
20}
21
22
23#endif // COMPAREERRORMESSAGE_H
ECbmModuleId
Definition CbmDefs.h:39
CbmRoot (+externals) headers.
uint32_t GetFlags() const
Flags (bitfield)
double GetTime() const
Absolute time [ns]
uint32_t GetAddress() const
Origin address
uint32_t GetPayload() const
Payload (optional)
ECbmModuleId GetSystemId() const
System (enum DetectorId)
void compareErrorMessageDataMembers(CbmErrorMessage &test, ECbmModuleId sysId, double dTime, uint32_t uAddress, uint32_t uFlags, uint32_t uPayload)