Public Member Functions | Private Member Functions | List of all members
testTimestamp Class Reference
Inheritance diagram for testTimestamp:

Public Member Functions

void setUp ()
 
void tearDown ()
 
void constructTest ()
 
void comparisonTest ()
 

Private Member Functions

 CPPUNIT_TEST_SUITE (testTimestamp)
 
 CPPUNIT_TEST (constructTest)
 
 CPPUNIT_TEST (comparisonTest)
 
 CPPUNIT_TEST_SUITE_END ()
 

Detailed Description

Definition at line 16 of file timestamp_t.cppunit.cc.

Member Function Documentation

void testTimestamp::comparisonTest ( )

Definition at line 60 of file timestamp_t.cppunit.cc.

61 {
62  const Timestamp small(1);
63  const Timestamp med(2);
64 
65  CPPUNIT_ASSERT(small < med);
66  CPPUNIT_ASSERT(small <= med);
67  CPPUNIT_ASSERT(!(small == med));
68  CPPUNIT_ASSERT(small != med);
69  CPPUNIT_ASSERT(!(small > med));
70  CPPUNIT_ASSERT(!(small >= med));
71 }
void testTimestamp::constructTest ( )

Definition at line 40 of file timestamp_t.cppunit.cc.

41 {
42  const TimeValue_t t = 2;
43 
44  Timestamp temp(t);
45 
46  CPPUNIT_ASSERT(temp.value() == t);
47 
48  CPPUNIT_ASSERT(Timestamp::invalidTimestamp() < Timestamp::beginOfTime());
49  CPPUNIT_ASSERT(Timestamp::beginOfTime() < Timestamp::endOfTime());
50  CPPUNIT_ASSERT(Timestamp::endOfTime().value() + 1 == 0);
51 
52  Timestamp db(0xdeadbeefbeefdead);
53 
54  CPPUNIT_ASSERT(db.timeLow() == 0xbeefdead);
55  CPPUNIT_ASSERT(db.timeHigh() == 0xdeadbeef);
56  CPPUNIT_ASSERT(db.value() == 0xdeadbeefbeefdead);
57 }
std::uint64_t TimeValue_t
Definition: Timestamp.h:8
const GenericPointer< typename T::ValueType > T2 value
Definition: pointer.h:1225
testTimestamp::CPPUNIT_TEST ( constructTest  )
private
testTimestamp::CPPUNIT_TEST ( comparisonTest  )
private
testTimestamp::CPPUNIT_TEST_SUITE ( testTimestamp  )
private
testTimestamp::CPPUNIT_TEST_SUITE_END ( )
private
void testTimestamp::setUp ( )
inline

Definition at line 26 of file timestamp_t.cppunit.cc.

27  {}
void testTimestamp::tearDown ( )
inline

Definition at line 29 of file timestamp_t.cppunit.cc.

30  {}

The documentation for this class was generated from the following file: