1 #define BOOST_TEST_MODULE(EventID_t) 2 #include "boost/test/unit_test.hpp" 8 BOOST_AUTO_TEST_SUITE(EventID_t)
24 BOOST_TEST(good.
run() == rt);
25 BOOST_TEST(good.
subRun() == srt);
26 BOOST_TEST(good.
event() == et);
38 BOOST_TEST(fs.isValid());
39 BOOST_TEST(fs.isFlush());
40 BOOST_TEST(fs.subRunID().isFlush());
41 BOOST_TEST(!fs.runID().isFlush());
54 BOOST_TEST(small < med);
55 BOOST_TEST(small <= med);
56 BOOST_TEST(!(small == med));
57 BOOST_TEST(small != med);
58 BOOST_TEST(!(small > med));
59 BOOST_TEST(!(small >= med));
60 BOOST_TEST(med2 == med);
61 BOOST_TEST(med2 <= med);
62 BOOST_TEST(med2 >= med);
63 BOOST_TEST(!(med2 != med));
64 BOOST_TEST(!(med2 < med));
65 BOOST_TEST(!(med2 > med));
66 BOOST_TEST(med < large);
67 BOOST_TEST(med <= large);
68 BOOST_TEST(!(med == large));
69 BOOST_TEST(med != large);
70 BOOST_TEST(!(med > large));
71 BOOST_TEST(!(med >= large));
72 BOOST_TEST(large < largest);
73 BOOST_TEST(large <= largest);
74 BOOST_TEST(!(large == largest));
75 BOOST_TEST(large != largest);
76 BOOST_TEST(!(large > largest));
77 BOOST_TEST(!(large >= largest));
84 BOOST_TEST(first < second);
85 BOOST_TEST(first == (second.
previous()));
87 BOOST_TEST(run2 < run2.
nextRun());
91 BOOST_TEST(largeEvent.isValid());
92 EventID next(largeEvent.next());
95 BOOST_TEST(next.isValid());
96 BOOST_TEST(!next.isFlush());
102 BOOST_TEST(e1.
event() == 0u);
104 BOOST_TEST(e2.event() == 0u);
105 BOOST_TEST(e2.nextSubRun(0u).event() == 0u);
108 BOOST_AUTO_TEST_SUITE_END()
RunID const & runID() const
static constexpr EventID flushEvent() noexcept
SubRunID const & subRunID() const
static constexpr double fs
static EventID maxEvent()
BOOST_AUTO_TEST_CASE(DefaultConstruction)
IDNumber_t< Level::SubRun > SubRunNumber_t
EventID nextSubRun(EventNumber_t first=IDNumber< Level::Event >::first()) const
static SubRunID firstSubRun()
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
IDNumber_t< Level::Event > EventNumber_t
EventNumber_t event() const
static EventID firstEvent()
second_as<> second
Type of time stored in seconds, in double precision.
SubRunNumber_t subRun() const
IDNumber_t< Level::Run > RunNumber_t