blob: 15b762fffa96e30a8f5dd818bf06dfce6b54dc04 [file] [log] [blame]
#include "platform/wtf/Time.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace WTF {
namespace {
TEST(TimeTicks, NumericOperations) {
TimeTicks zero;
ASSERT_EQ(0, zero.ToInternalValueForTesting());
TimeTicks t1 = zero + TimeDelta::FromMilliseconds(1001);
ASSERT_EQ(1001000, t1.ToInternalValueForTesting());
TimeTicks t2 = zero + TimeDelta::FromSeconds(1);
ASSERT_EQ(TimeDelta::FromMilliseconds(1), t1 - t2);
}
} // namespace
} // namespace WTF