Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include <gtest/gtest.h>
00018
00019 #include <scip2/walltime.h>
00020
00021 TEST(WalltimeTest, testTimestampOverflow)
00022 {
00023 for (uint64_t start_device_time = 0;
00024 start_device_time < (1 << 24);
00025 start_device_time += (1 << 23))
00026 {
00027 scip2::Walltime<24> walltime;
00028
00029 for (uint64_t device_time = start_device_time;
00030 device_time < (1 << 25);
00031 device_time += 25)
00032 {
00033 const uint32_t device_timestamp = device_time & 0xFFFFFF;
00034 ASSERT_EQ(walltime.update(device_timestamp), device_time);
00035 }
00036 }
00037 }
00038
00039 int main(int argc, char **argv)
00040 {
00041 testing::InitGoogleTest(&argc, argv);
00042
00043 return RUN_ALL_TESTS();
00044 }