00001 #include "artdaq-core/Data/RawEvent.hh"
00002 #include "artdaq-core/Data/Fragment.hh"
00003
00004 #define BOOST_TEST_MODULE(RawEvent_t)
00005 #ifdef HAVE_CANVAS
00006 #include "cetlib/quiet_unit_test.hpp"
00007 #else
00008 #include "boost/test/auto_unit_test.hpp"
00009 #endif
00010
00011 BOOST_AUTO_TEST_SUITE(RawEvent_test)
00012
00013 BOOST_AUTO_TEST_CASE(InsertFragment)
00014 {
00015
00016
00017
00018
00019
00020 artdaq::RawEvent r1(1, 1, 1);
00021 std::unique_ptr<artdaq::Fragment> f1(new artdaq::Fragment(1, 1));
00022 std::unique_ptr<artdaq::Fragment> f2(new artdaq::Fragment(2, 1));
00023 std::unique_ptr<artdaq::Fragment> f3(new artdaq::Fragment(3, 1));
00024
00025 try {
00026 r1.insertFragment(std::move(f1));
00027 r1.insertFragment(std::move(f2));
00028 r1.insertFragment(std::move(f3));
00029
00030 }
00031 catch (...) {
00032 BOOST_REQUIRE(0 && "Should not have thrown exception");
00033 }
00034 }
00035
00036 BOOST_AUTO_TEST_SUITE_END()
00037