TriggerRangeUnitTest.cpp
Go to the documentation of this file.
1 /*
2  * File: TriggerRangeUnitTest.cpp
3  * Author: denis
4  *
5  * Created on September 24, 2012, 10:18 AM
6  */
7 //#include "DAQDataFormats/../unittest/RawDAQDataUnitTest.h"
8 //#include "DAQDataFormats/../unittest/TriggerRangeConstructor.h"
9 #include "RawDAQDataUnitTest.h"
11 
12 namespace daqdataformats {
13 
17  CPPUNIT_TEST(testReadDataIntoSameVersion);
18  CPPUNIT_TEST(testReadDataIntoUnknownVersion);
22 public:
25 
30 
31 private:
33 
34 private:
36 };
37 
38 //------------------------------------------------------------------------------
41  ,_mainDFConstructor((TriggerRangeConstructor*)_dataFormatConstructor)
42 {
43 }
44 
45 //------------------------------------------------------------------------------
47 
48 //------------------------------------------------------------------------------
50 
52  ASSERT_CHECK_FIELD (TriggerLength);
53 
54  CPPUNIT_ASSERT(version == (version_t) df->getVersion());
55 
57 
58  delete df;
59 }
60 
61 //CPPUNIT_TEST_SUITE_REGISTRATION(TriggerRangeUnitTest);
63 CPPUNIT_REGISTRY_ADD_TO_DEFAULT("DAQDataFormats");
64 
65 }; // end of class
#define DEFINE_testReadDataIntoSameVersion
#define DEFINE_testReadDataIntoUnknownVersion
TriggerRangeConstructor * _mainDFConstructor
#define ASSERT_PRINT_IS_NOT_UNKNOWN
virtual void basicFieldGetAndSetChecks()
Check all field gets and sets for all versions.
#define DEFINE_checkShallowCopyConstructor(CLASS)
Standard function that checks Shallow Copy Constructor.
virtual void checkShallowCopyConstructor()
Check Shallow Copy Constructors for all versions.
Base class for RawDAQData unittest.
Class to hold the data from the global trigger range in the correct format.
virtual void basicFieldGetAndSetChecksForGivenVersion(const version_t)
Check all field gets and sets for a given version.
RawDAQDataConstructor * _dataFormatConstructor
Pointer to RawDAQDataConstructor.
CPPUNIT_TEST(basicFieldGetAndSetChecks)
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(ConfigurationBlockUnitTest,"DAQDataFormats")
#define DEFINE_checkDeepCopyConstructor(CLASS)
Standard function that checks Deep Copy Constructor.
const XML_Char * version
Definition: expat.h:187
virtual void checkDeepCopyConstructor()
Check Deep Copy Constructors for all versions.
#define ASSERT_CHECK_FIELD(FIELD_NAME)
Assert checking get/set of the the field is good.
CPPUNIT_TEST_SUITE(TriggerRangeUnitTest)
int32_t version_t
Definition: RawDAQData.h:72
daqdataformats::RawDAQData * getEmptyDataFormat(const daqdataformats::version_t) const
method to create an empty dataformat with a given version
Class to hold the data from the FEBs in correct formats.
CPPUNIT_REGISTRY_ADD_TO_DEFAULT("DAQDataFormats")