Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Side by Side Diff: third_party/WebKit/Source/wtf/TimeTest.cpp

Issue 2771783003: Move wtf_unittests to platform/wtf/. (Closed)
Patch Set: Rebase. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 #include "wtf/Time.h"
2
3 #include "testing/gtest/include/gtest/gtest.h"
4
5 namespace WTF {
6 namespace {
7
8 TEST(TimeTicks, NumericOperations) {
9 TimeTicks zero;
10 ASSERT_EQ(0, zero.ToInternalValueForTesting());
11
12 TimeTicks t1 = zero + TimeDelta::FromMilliseconds(1001);
13 ASSERT_EQ(1001000, t1.ToInternalValueForTesting());
14
15 TimeTicks t2 = zero + TimeDelta::FromSeconds(1);
16 ASSERT_EQ(TimeDelta::FromMilliseconds(1), t1 - t2);
17 }
18
19 TEST(Time, NumericOperations) {
20 Time zero;
21 ASSERT_EQ(0, zero.ToInternalValueForTesting());
22
23 Time t1 = zero + TimeDelta::FromMilliseconds(1001);
24 ASSERT_EQ(1001000, t1.ToInternalValueForTesting());
25
26 Time t2 = zero + TimeDelta::FromSeconds(1);
27 ASSERT_EQ(TimeDelta::FromMilliseconds(1), t1 - t2);
28 }
29
30 } // namespace
31 } // namespace WTF
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/StringHasherTest.cpp ('k') | third_party/WebKit/Source/wtf/TreeNodeTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698