5 #include <gtest/gtest-spi.h>
6 #include <gtest/gtest.h>
10 TEST(_GTestCbmPixelHit, CheckDefaultConstructor) {
13 SCOPED_TRACE(
"CheckDefaultConstructor");
15 test,
kPIXELHIT, 0., 0., -1, -1,
nullptr, -1., -1., 0., 0., 0., 0., 0.);
19 TEST(_GTestCbmPixelHit, CheckStandardConstructor) {
20 CbmPixelHit test {-1, 0., 0., 0., 0., 0., 0., 0., -1};
22 SCOPED_TRACE(
"CheckStandardConstructor");
24 test,
kPIXELHIT, 0., 0., -1, -1,
nullptr, -1., -1., 0., 0., 0., 0., 0.);
28 TEST(_GTestCbmPixelHit, CheckStandardConstructorWithTime) {
29 CbmPixelHit test {-1, 0., 0., 0., 0., 0., 0., 0., -1, -2., -2.};
31 SCOPED_TRACE(
"CheckStandardConstructorWithTime");
33 test,
kPIXELHIT, 0., 0., -1, -1,
nullptr, -2., -2., 0., 0., 0., 0., 0.);
37 TEST(_GTestCbmPixelHit, CheckStandardConstructorTVector3) {
50 SCOPED_TRACE(
"CheckStandardConstructor");
52 test,
kPIXELHIT, 0., 0., -1, -1,
nullptr, -1., -1., 0., 0., 0., 0., 0.);
56 TEST(_GTestCbmPixelHit, CheckStandardConstructorTVector3WithTime) {
69 SCOPED_TRACE(
"CheckStandardConstructorWithTime");
71 test,
kPIXELHIT, 0., 0., -1, -1,
nullptr, -2., -2., 0., 0., 0., 0., 0.);
75 TEST(_GTestCbmPixelHit, CheckSetters) {
78 SCOPED_TRACE(
"CheckSetters: Initial Test");
80 test,
kPIXELHIT, 0., 0., -1, -1,
nullptr, -1., -1., 0., 0., 0., 0., 0.);
85 SCOPED_TRACE(
"CheckSetters: SetX");
87 test,
kPIXELHIT, 0., 0., -1, -1,
nullptr, -1., -1., -11., 0., 0., 0., 0.);
92 SCOPED_TRACE(
"CheckSetters: SetDx");
111 SCOPED_TRACE(
"CheckSetters: SetY");
130 SCOPED_TRACE(
"CheckSetters: SetDy");
149 SCOPED_TRACE(
"CheckSetters: SetDxy");
166 TVector3
pos {-21., -22., -23.};
169 SCOPED_TRACE(
"CheckSetters: SetPosition");
186 TVector3 poserror {-31., -32., -33.};
189 SCOPED_TRACE(
"CheckSetters: SetPosition");
208 EXPECT_FLOAT_EQ(pos1.X(),
pos.X());
209 EXPECT_FLOAT_EQ(pos1.Y(),
pos.Y());
210 EXPECT_FLOAT_EQ(pos1.Z(),
pos.Z());
214 EXPECT_FLOAT_EQ(poserror1.X(), poserror.X());
215 EXPECT_FLOAT_EQ(poserror1.Y(), poserror.Y());
216 EXPECT_FLOAT_EQ(poserror1.Z(), poserror.Z());
219 TEST(_GTestCbmPixelHit, CheckToString) {
222 "CbmPixelHit: address=-1 pos=(0,0,0) err=(0,0,0) dxy=0 refId=-1\n",