| Index: third_party/WebKit/Source/wtf/TimeTest.cpp
|
| diff --git a/third_party/WebKit/Source/wtf/TimeTest.cpp b/third_party/WebKit/Source/wtf/TimeTest.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..f39176c40a2fcb1c8f98c021e7a794844ad2d734
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/wtf/TimeTest.cpp
|
| @@ -0,0 +1,31 @@
|
| +#include "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);
|
| +}
|
| +
|
| +TEST(Time, NumericOperations) {
|
| + Time zero;
|
| + ASSERT_EQ(0, zero.ToInternalValueForTesting());
|
| +
|
| + Time t1 = zero + TimeDelta::FromMilliseconds(1001);
|
| + ASSERT_EQ(1001000, t1.ToInternalValueForTesting());
|
| +
|
| + Time t2 = zero + TimeDelta::FromSeconds(1);
|
| + ASSERT_EQ(TimeDelta::FromMilliseconds(1), t1 - t2);
|
| +}
|
| +
|
| +} // namespace
|
| +} // namespace WTF
|
|
|