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

Side by Side Diff: tests/corelib/duration_test.dart

Issue 12743005: Revert "Remove Expect from core library." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reupload (first upload failed). Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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";
6
7 main() { 5 main() {
8 Duration d; 6 Duration d;
9 d = new Duration(days: 1); 7 d = new Duration(days: 1);
10 Expect.equals(86400000000, d.inMicroseconds); 8 Expect.equals(86400000000, d.inMicroseconds);
11 Expect.equals(86400000, d.inMilliseconds); 9 Expect.equals(86400000, d.inMilliseconds);
12 Expect.equals(86400, d.inSeconds); 10 Expect.equals(86400, d.inSeconds);
13 Expect.equals(1440, d.inMinutes); 11 Expect.equals(1440, d.inMinutes);
14 Expect.equals(24, d.inHours); 12 Expect.equals(24, d.inHours);
15 Expect.equals(1, d.inDays); 13 Expect.equals(1, d.inDays);
16 d = const Duration(hours: 1); 14 d = const Duration(hours: 1);
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 d = const Duration(hours: 1999, minutes: 17, seconds: 42); 217 d = const Duration(hours: 1999, minutes: 17, seconds: 42);
220 Expect.equals("1999:17:42.000000", d.toString()); 218 Expect.equals("1999:17:42.000000", d.toString());
221 219
222 d = const Duration(days: -1, hours: -3, minutes: -17, seconds: -42, 220 d = const Duration(days: -1, hours: -3, minutes: -17, seconds: -42,
223 milliseconds: -823, microseconds: -127); 221 milliseconds: -823, microseconds: -127);
224 Expect.equals("-27:17:42.823127", d.toString()); 222 Expect.equals("-27:17:42.823127", d.toString());
225 223
226 d = const Duration(hours: -1999, minutes: -17, seconds: -42); 224 d = const Duration(hours: -1999, minutes: -17, seconds: -42);
227 Expect.equals("-1999:17:42.000000", d.toString()); 225 Expect.equals("-1999:17:42.000000", d.toString());
228 } 226 }
OLDNEW
« no previous file with comments | « tests/corelib/double_compare_test.dart ('k') | tests/corelib/exception_implementation_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698