CbmRoot
Loading...
Searching...
No Matches
compareDigi.h
Go to the documentation of this file.
1/* Copyright (C) 2017-2019 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Florian Uhlig [committer] */
4
5#ifndef COMPAREDIGI_H
6#define COMPAREDIGI_H 1
7
8#include "gtest/gtest.h"
9
10void compareDigiDataMembers(CbmTestDigi& test, int32_t address, double charge, int32_t systemid, double time)
11{
12 int32_t retValInt {-222};
13 double retValDouble {-222.};
14
15 retValInt = test.GetAddress();
16 EXPECT_EQ(address, retValInt);
17
18 retValDouble = test.GetCharge();
19 EXPECT_FLOAT_EQ(charge, retValDouble);
20
21 retValInt = test.GetSystemId();
22 EXPECT_EQ(systemid, retValInt);
23
24 retValDouble = test.GetTime();
25 EXPECT_FLOAT_EQ(time, retValDouble);
26}
27
28#endif // COMPAREDIGI_H
int32_t GetSystemId() const
int32_t GetAddress() const
double GetTime() const
void compareDigiDataMembers(CbmTestDigi &test, int32_t address, double charge, int32_t systemid, double time)
Definition compareDigi.h:10