CbmRoot
Loading...
Searching...
No Matches
compareLink.h
Go to the documentation of this file.
1/* Copyright (C) 2017-2021 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Florian Uhlig [committer] */
4
5#ifndef COMPARELINK_H
6#define COMPARELINK_H 1
7
8#include "CbmLink.h"
9
10#include "gtest/gtest.h"
11
12void compareLinkDataMembers(CbmLink& test, int32_t file, int32_t entry, int32_t index, double weight)
13{
14 int32_t intRetVal {-111};
15 float floatRetVal {-111};
16
17 intRetVal = test.GetFile();
18 EXPECT_EQ(file, intRetVal);
19
20 intRetVal = test.GetEntry();
21 EXPECT_EQ(entry, intRetVal);
22
23 intRetVal = test.GetIndex();
24 EXPECT_EQ(index, intRetVal);
25
26 floatRetVal = test.GetWeight();
27 EXPECT_FLOAT_EQ(weight, floatRetVal);
28}
29
30#endif //COMPARELINK_H