CbmRoot
Loading...
Searching...
No Matches
compareMatch.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 COMPAREMATCH_H
6#define COMPAREMATCH_H 1
7
8#include "CbmLink.h"
9#include "CbmMatch.h"
10
11#include "gtest/gtest.h"
12
13void compareMatchDataMembers(CbmMatch& testMatch, int32_t noflinks, double weight)
14{
15 int32_t linkLength {-111};
16 double totalWeight {-111.};
17
18 std::vector<CbmLink> link = testMatch.GetLinks();
19 linkLength = link.size();
20 EXPECT_EQ(noflinks, linkLength);
21
22 linkLength = testMatch.GetNofLinks();
23 EXPECT_EQ(noflinks, linkLength);
24
25 totalWeight = testMatch.GetTotalWeight();
26 EXPECT_FLOAT_EQ(weight, totalWeight);
27}
28
29#endif // COMPAREMATCH_H
int32_t GetNofLinks() const
Definition CbmMatch.h:42
double GetTotalWeight() const
Definition CbmMatch.h:43
const std::vector< CbmLink > & GetLinks() const
Definition CbmMatch.h:40
void compareMatchDataMembers(CbmMatch &testMatch, int32_t noflinks, double weight)