CbmRoot
_GTestCbmTrdDigi.cxx
Go to the documentation of this file.
1 #include "CbmTrdDigi.h"
2 
3 #include "gtest/gtest-spi.h"
4 #include "gtest/gtest.h"
5 
6 #include "compareTrdDigi.h"
7 
8 TEST(_GTestCbmTrdDigi, CheckDefaultConstructor) {
9  // Create object
10  CbmTrdDigi test;
12 
13  CbmTrdDigi* test1 = new CbmTrdDigi();
14 
16 }
17 
18 TEST(_GTestCbmTrdDigi, CheckStandardConstructor) {
19  // Create object
20  // This creates a Spadic standard digi, fasp test to be added here
21  Int_t padChNr = 42;
22  Int_t uniqueModuleId =
23  (Int_t) ECbmModuleId::kTrd; // Unique ModuleId of first module
24  Double_t charge = 42.42;
25  ULong64_t digiTime = 42001;
26  Int_t errClass = 0;
27  CbmTrdDigi test(padChNr,
28  uniqueModuleId,
29  charge,
30  digiTime,
31  ((Int_t) CbmTrdDigi::kSelf),
32  errClass);
34  test, padChNr, ECbmModuleId::kTrd, digiTime, charge);
35 
36  CbmTrdDigi* test1 = new CbmTrdDigi(padChNr,
37  uniqueModuleId,
38  charge,
39  digiTime,
40  ((Int_t) CbmTrdDigi::kSelf),
41  errClass);
42 
44  *test1, padChNr, ECbmModuleId::kTrd, digiTime, charge);
45  ;
46 }
47 
48 
49 TEST(_GTestCbmTrdDigi, CheckGetClassName) {
50  // Create object
51  CbmTrdDigi test;
52 
54 
55  EXPECT_STREQ("CbmTrdDigi", test.GetClassName());
56 }
CbmTrdDigi::kSelf
@ kSelf
Definition: CbmTrdDigi.h:19
CbmTrdDigi.h
CbmTrdDigi::GetClassName
static const char * GetClassName()
Class name (static)
Definition: CbmTrdDigi.h:123
compareTrdDigiDataMembers
void compareTrdDigiDataMembers(CbmTrdDigi &test, Int_t padChNr, ECbmModuleId systemid, ULong64_t time, Double_t charge)
Definition: compareTrdDigi.h:4
ECbmModuleId::kTrd
@ kTrd
Transition Radiation Detector.
CbmTrdDigi
Definition: CbmTrdDigi.h:14
compareTrdDigi.h
TEST
TEST(_GTestCbmTrdDigi, CheckDefaultConstructor)
Definition: _GTestCbmTrdDigi.cxx:8