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

Side by Side Diff: tests/corelib_strong/date_time4_test.dart

Issue 2771453003: Format all tests. (Closed)
Patch Set: Format files Created 3 years, 8 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
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 6
7 // Test fromString with 6 digits after the decimal point. 7 // Test fromString with 6 digits after the decimal point.
8 8
9 bool get supportsMicroseconds => 9 bool get supportsMicroseconds =>
10 new DateTime.fromMicrosecondsSinceEpoch(1).microsecondsSinceEpoch == 1; 10 new DateTime.fromMicrosecondsSinceEpoch(1).microsecondsSinceEpoch == 1;
11 11
12
13 main() { 12 main() {
14 if (supportsMicroseconds) { 13 if (supportsMicroseconds) {
15 testMicrosecondPrecision(); 14 testMicrosecondPrecision();
16 } else { 15 } else {
17 testMillisecondPrecision(); 16 testMillisecondPrecision();
18 } 17 }
19 } 18 }
20 19
21 void testMillisecondPrecision() { 20 void testMillisecondPrecision() {
22 // We only support milliseconds. If the user supplies more data (the "51" 21 // We only support milliseconds. If the user supplies more data (the "51"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 Expect.equals(2012, dt1.year); 95 Expect.equals(2012, dt1.year);
97 Expect.equals(3, dt1.month); 96 Expect.equals(3, dt1.month);
98 Expect.equals(30, dt1.day); 97 Expect.equals(30, dt1.day);
99 Expect.equals(4, dt1.hour); 98 Expect.equals(4, dt1.hour);
100 Expect.equals(28, dt1.minute); 99 Expect.equals(28, dt1.minute);
101 Expect.equals(13, dt1.second); 100 Expect.equals(13, dt1.second);
102 Expect.equals(752, dt1.millisecond); 101 Expect.equals(752, dt1.millisecond);
103 Expect.equals(341, dt1.microsecond); 102 Expect.equals(341, dt1.microsecond);
104 Expect.equals(true, dt1.isUtc); 103 Expect.equals(true, dt1.isUtc);
105 } 104 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698