Public Member Functions | |
MicroSliceUnitTest () | |
~MicroSliceUnitTest () | |
DEFINE_checkDeepCopyConstructor (RawMicroSlice) DEFINE_checkShallowCopyConstructor(RawMicroSlice) void loopedcheckDeepCopyConstructor() | |
void | loopedcheckShallowCopyConstructor () |
DEFINE_testReadDataIntoSameVersion void | basicFieldGetAndSetChecks () |
Check all field gets and sets for all versions. More... | |
virtual void | checkDeepCopyConstructor () |
Check Deep Copy Constructors for all versions. More... | |
virtual void | checkShallowCopyConstructor () |
Check Shallow Copy Constructors for all versions. More... | |
void | setUp () |
Some setup/teardown methods that Unittest require. More... | |
void | tearDown () |
Protected Member Functions | |
virtual bool | checkDeepCopyConstructor (const version_t) const =0 |
Check constructors - deep copy and shallow copy. More... | |
virtual bool | checkShallowCopyConstructor (const version_t) const =0 |
virtual void | basicFieldGetAndSetChecksForGivenVersion (const version_t) |
Check all field gets and sets for a given version. More... | |
bool | checkReadDataIntoSameVersion () const |
Check readData for all versions of the dataformat. More... | |
bool | checkReadDataIntoUnknownVersion () const |
Check readData for all versions of the dataformat. More... | |
virtual DATAFORMAT_COMPARE_RESULTS | compareDataFormats (const RawDAQData *, const RawDAQData *) const |
Are the two data formats the same? More... | |
virtual bool | compareDataFormats (const RawDAQData *, const RawDAQData *, const DATAFORMAT_COMPARE_RESULTS) const |
bool | isPrintDataFormatUnknownVersion (const RawDAQData *) const |
Sometimes print() can print "DAQDataFormat is of unknown version". More... | |
Protected Attributes | |
RawDAQDataConstructor * | _dataFormatConstructor |
Pointer to RawDAQDataConstructor. More... | |
Private Member Functions | |
CPPUNIT_TEST_SUITE (MicroSliceUnitTest) | |
CPPUNIT_TEST (basicFieldGetAndSetChecks) | |
CPPUNIT_TEST (loopedcheckDeepCopyConstructor) | |
CPPUNIT_TEST (loopedcheckShallowCopyConstructor) | |
CPPUNIT_TEST (testReadDataIntoSameVersion) | |
CPPUNIT_TEST_SUITE_END () | |
Private Attributes | |
MicroSliceConstructor * | _mainDFConstructor |
Definition at line 15 of file MicroSliceUnitTest.cpp.
daqdataformats::MicroSliceUnitTest::MicroSliceUnitTest | ( | ) |
Definition at line 40 of file MicroSliceUnitTest.cpp.
daqdataformats::MicroSliceUnitTest::~MicroSliceUnitTest | ( | ) |
Definition at line 47 of file MicroSliceUnitTest.cpp.
|
virtual |
Check all field gets and sets for all versions.
Checking just construction
Now Checking filling MicroSlice with NanoSlices
Reimplemented from daqdataformats::RawDAQDataUnitTest.
Definition at line 50 of file MicroSliceUnitTest.cpp.
References daqdataformats::MicroSliceConstructor::_currentNanoSliceVersion, _mainDFConstructor, daqdataformats::RawMicroSlice::addNanoSlice(), ASSERT_CHECK_FIELD, daqdataformats::RawDAQDataUnitTest::checkDeepCopyConstructor(), daqdataformats::RawDAQDataUnitTest::compareDataFormats(), daqdataformats::rawdaqdataformat::DAQDATAFORMAT_UNKNOWN_VERSION, allInOneTrainingPlots::df, allTimeWatchdog::endl, daqdataformats::FIRST_CONTAINS_SECOND, daqdataformats::MicroSliceConstructor::getEmptyDataFormat(), daqdataformats::RawMicroSlice::getHeader(), daqdataformats::MicroSliceConstructor::getNanoSlicesVersion(), daqdataformats::RawMicroSlice::getNumNanoSlices(), daqdataformats::RawMicroSlice::getTimingMarker(), LOG_DEBUG, and daqdataformats::RawMicroSlice::setVersion().
|
inlineprotectedvirtualinherited |
Check all field gets and sets for a given version.
Reimplemented in daqdataformats::MicroBlockUnitTest.
Definition at line 132 of file RawDAQDataUnitTest.h.
References daqdataformats::RawDAQDataUnitTest::checkDeepCopyConstructor(), daqdataformats::RawDAQDataUnitTest::checkReadData(), daqdataformats::RawDAQDataUnitTest::checkReadDataIntoSameVersion(), daqdataformats::RawDAQDataUnitTest::checkReadDataIntoUnknownVersion(), daqdataformats::RawDAQDataUnitTest::checkShallowCopyConstructor(), daqdataformats::RawDAQDataUnitTest::compareDataFormats(), daqdataformats::RawDAQDataUnitTest::getDifferenceBetweenStrings(), daqdataformats::RawDAQDataUnitTest::isPrintDataFormatUnknownVersion(), daqdataformats::RawDAQDataUnitTest::resizeBufferToSizeOfDataFormats(), and string.
Referenced by daqdataformats::RawDAQDataUnitTest::basicFieldGetAndSetChecks(), daqdataformats::ConfigurationBlockUnitTest::~ConfigurationBlockUnitTest(), daqdataformats::ConfigurationHeaderUnitTest::~ConfigurationHeaderUnitTest(), daqdataformats::ConfigurationNameUnitTest::~ConfigurationNameUnitTest(), daqdataformats::ConfigurationSystemIDUnitTest::~ConfigurationSystemIDUnitTest(), daqdataformats::ConfigurationTailUnitTest::~ConfigurationTailUnitTest(), daqdataformats::DataBlockHeaderUnitTest::~DataBlockHeaderUnitTest(), daqdataformats::DataBlockUnitTest::~DataBlockUnitTest(), daqdataformats::EventHeaderUnitTest::~EventHeaderUnitTest(), daqdataformats::EventTailUnitTest::~EventTailUnitTest(), daqdataformats::EventUnitTest::~EventUnitTest(), daqdataformats::MicroBlockHeaderUnitTest::~MicroBlockHeaderUnitTest(), daqdataformats::NanoSliceHeaderUnitTest::~NanoSliceHeaderUnitTest(), daqdataformats::NanoSliceUnitTest::~NanoSliceUnitTest(), daqdataformats::RunHeaderUnitTest::~RunHeaderUnitTest(), daqdataformats::TriggerHeaderUnitTest::~TriggerHeaderUnitTest(), daqdataformats::TriggerMaskUnitTest::~TriggerMaskUnitTest(), daqdataformats::TriggerRangeUnitTest::~TriggerRangeUnitTest(), daqdataformats::TriggerTimeUnitTest::~TriggerTimeUnitTest(), daqdataformats::TriggerTimingMarkerUnitTest::~TriggerTimingMarkerUnitTest(), and daqdataformats::TriggerUnitTest::~TriggerUnitTest().
|
inlinevirtualinherited |
Check Deep Copy Constructors for all versions.
Definition at line 120 of file RawDAQDataUnitTest.h.
Referenced by basicFieldGetAndSetChecks(), daqdataformats::MicroBlockUnitTest::basicFieldGetAndSetChecksForGivenVersion(), daqdataformats::RawDAQDataUnitTest::basicFieldGetAndSetChecksForGivenVersion(), and daqdataformats::MilliSliceUnitTest::testMilliSliceCRC().
|
protectedpure virtualinherited |
Check constructors - deep copy and shallow copy.
|
protectedinherited |
Check readData for all versions of the dataformat.
Definition at line 32 of file RawDAQDataUnitTest.cpp.
References allTimeWatchdog::endl, LOG_DEBUG, and VERSION_LOOP_iver.
Referenced by daqdataformats::RawDAQDataUnitTest::basicFieldGetAndSetChecksForGivenVersion().
|
protectedinherited |
Check readData for all versions of the dataformat.
Definition at line 41 of file RawDAQDataUnitTest.cpp.
References allTimeWatchdog::endl, LOG_DEBUG, and VERSION_LOOP_iver.
Referenced by daqdataformats::RawDAQDataUnitTest::basicFieldGetAndSetChecksForGivenVersion().
|
inlinevirtualinherited |
Check Shallow Copy Constructors for all versions.
Definition at line 123 of file RawDAQDataUnitTest.h.
Referenced by daqdataformats::RawDAQDataUnitTest::basicFieldGetAndSetChecksForGivenVersion(), loopedcheckShallowCopyConstructor(), daqdataformats::MilliSliceUnitTest::loopedcheckShallowCopyConstructor(), and daqdataformats::MicroBlockUnitTest::loopedcheckShallowCopyConstructor().
|
protectedpure virtualinherited |
|
protectedvirtualinherited |
Are the two data formats the same?
Print the first input dataformat into a string
Print the first input dataformat into a string
Compare the two strings and see if they are the same
See if first string contains second
See if second string contains first
Definition at line 227 of file RawDAQDataUnitTest.cpp.
References daqdataformats::DATAFORMATS_ARE_DIFFERENT, daqdataformats::DATAFORMATS_ARE_THE_SAME, daqdataformats::FIRST_CONTAINS_SECOND, daqdataformats::RawDAQData::print(), daqdataformats::SECOND_CONTAINS_FIRST, and string.
Referenced by basicFieldGetAndSetChecks(), daqdataformats::MilliSliceUnitTest::basicFieldGetAndSetChecks(), daqdataformats::RawDAQDataUnitTest::basicFieldGetAndSetChecksForGivenVersion(), daqdataformats::RawDAQDataUnitTest::checkReadData(), daqdataformats::ConfigurationBlockUnitTest::~ConfigurationBlockUnitTest(), daqdataformats::DataBlockUnitTest::~DataBlockUnitTest(), daqdataformats::EventUnitTest::~EventUnitTest(), daqdataformats::NanoSliceUnitTest::~NanoSliceUnitTest(), and daqdataformats::TriggerUnitTest::~TriggerUnitTest().
|
protectedvirtualinherited |
Print the first input dataformat into a string
Print the first input dataformat into a string
Compare the two strings and see if they are the same
Definition at line 250 of file RawDAQDataUnitTest.cpp.
References daqdataformats::DATAFORMATS_ARE_DIFFERENT, daqdataformats::DATAFORMATS_ARE_THE_SAME, daqdataformats::FIRST_CONTAINS_SECOND, daqdataformats::RawDAQDataUnitTest::getDifferenceBetweenStrings(), daqdataformats::getNameForResults(), LOG_ERROR, daqdataformats::RawDAQData::print(), fillBadChanDBTables::result, daqdataformats::SECOND_CONTAINS_FIRST, and string.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
daqdataformats::MicroSliceUnitTest::DEFINE_checkDeepCopyConstructor | ( | RawMicroSlice | ) |
|
protectedinherited |
Sometimes print() can print "DAQDataFormat is of unknown version".
Print the first input dataformat into a string
See if first string contains second
Definition at line 291 of file RawDAQDataUnitTest.cpp.
References daqdataformats::RawDAQData::print(), and string.
Referenced by daqdataformats::MilliSliceUnitTest::basicFieldGetAndSetChecks(), daqdataformats::RawDAQDataUnitTest::basicFieldGetAndSetChecksForGivenVersion(), and daqdataformats::RawDAQDataUnitTest::checkReadData().
void daqdataformats::MicroSliceUnitTest::loopedcheckShallowCopyConstructor | ( | ) |
Definition at line 116 of file MicroSliceUnitTest.cpp.
References daqdataformats::MicroSliceConstructor::_currentNanoSliceVersion, _mainDFConstructor, daqdataformats::RawDAQDataUnitTest::checkShallowCopyConstructor(), daqdataformats::CPPUNIT_REGISTRY_ADD_TO_DEFAULT(), daqdataformats::CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(), allTimeWatchdog::endl, and LOG_DEBUG.
|
inlineinherited |
Some setup/teardown methods that Unittest require.
Definition at line 126 of file RawDAQDataUnitTest.h.
|
inlineinherited |
Definition at line 127 of file RawDAQDataUnitTest.h.
|
protectedinherited |
Pointer to RawDAQDataConstructor.
Definition at line 174 of file RawDAQDataUnitTest.h.
Referenced by daqdataformats::RawDAQDataUnitTest::checkReadData(), and daqdataformats::RawDAQDataUnitTest::~RawDAQDataUnitTest().
|
private |
Definition at line 36 of file MicroSliceUnitTest.cpp.
Referenced by basicFieldGetAndSetChecks(), and loopedcheckShallowCopyConstructor().