1#include <game/mapitems.h>
2
3#include <gtest/gtest-printers.h>
4#include <gtest/gtest.h>
5
6namespace testing::internal
7{
8 template<>
9 class UniversalPrinter<CFixedTime>
10 {
11 public:
12 static void Print(const CFixedTime &FixedTime, std::ostream *pOutputStream)
13 {
14 *pOutputStream << "CFixedTime with internal value " << FixedTime.GetInternal();
15 }
16 };
17
18}
19
20TEST(Mapitems, FixedTimeRoundtrip)
21{
22 for(CFixedTime Fixed = CFixedTime(0); Fixed < CFixedTime(1000000); Fixed += CFixedTime(1))
23 {
24 ASSERT_EQ(Fixed, CFixedTime::FromSeconds(Fixed.AsSeconds()));
25 }
26}
27