OLD | NEW |
(Empty) | |
| 1 dart_library.library('corelib/date_time5_test', null, /* Imports */[ |
| 2 'dart_sdk', |
| 3 'expect' |
| 4 ], function load__date_time5_test(exports, dart_sdk, expect) { |
| 5 'use strict'; |
| 6 const core = dart_sdk.core; |
| 7 const dart = dart_sdk.dart; |
| 8 const dartx = dart_sdk.dartx; |
| 9 const expect$ = expect.expect; |
| 10 const date_time5_test = Object.create(null); |
| 11 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 12 date_time5_test.main = function() { |
| 13 let d = new core.DateTime(2012); |
| 14 expect$.Expect.equals(2012, d.year); |
| 15 expect$.Expect.equals(1, d.month); |
| 16 expect$.Expect.equals(1, d.day); |
| 17 expect$.Expect.equals(0, d.hour); |
| 18 expect$.Expect.equals(0, d.minute); |
| 19 expect$.Expect.equals(0, d.second); |
| 20 expect$.Expect.equals(0, d.millisecond); |
| 21 d = new core.DateTime(2012, 1, 28); |
| 22 expect$.Expect.equals(2012, d.year); |
| 23 expect$.Expect.equals(1, d.month); |
| 24 expect$.Expect.equals(28, d.day); |
| 25 expect$.Expect.equals(0, d.hour); |
| 26 expect$.Expect.equals(0, d.minute); |
| 27 expect$.Expect.equals(0, d.second); |
| 28 expect$.Expect.equals(0, d.millisecond); |
| 29 d = new core.DateTime(1970, 3); |
| 30 expect$.Expect.equals(1970, d.year); |
| 31 expect$.Expect.equals(3, d.month); |
| 32 expect$.Expect.equals(1, d.day); |
| 33 expect$.Expect.equals(0, d.hour); |
| 34 expect$.Expect.equals(0, d.minute); |
| 35 expect$.Expect.equals(0, d.second); |
| 36 expect$.Expect.equals(0, d.millisecond); |
| 37 d = new core.DateTime(1970, 3, 1, 11); |
| 38 expect$.Expect.equals(1970, d.year); |
| 39 expect$.Expect.equals(3, d.month); |
| 40 expect$.Expect.equals(1, d.day); |
| 41 expect$.Expect.equals(11, d.hour); |
| 42 expect$.Expect.equals(0, d.minute); |
| 43 expect$.Expect.equals(0, d.second); |
| 44 expect$.Expect.equals(0, d.millisecond); |
| 45 d = new core.DateTime(0, 12, 24, 0, 12); |
| 46 expect$.Expect.equals(0, d.year); |
| 47 expect$.Expect.equals(12, d.month); |
| 48 expect$.Expect.equals(24, d.day); |
| 49 expect$.Expect.equals(0, d.hour); |
| 50 expect$.Expect.equals(12, d.minute); |
| 51 expect$.Expect.equals(0, d.second); |
| 52 expect$.Expect.equals(0, d.millisecond); |
| 53 d = new core.DateTime(-1, 2, 2, 3, 0, 0, 4); |
| 54 expect$.Expect.equals(-1, d.year); |
| 55 expect$.Expect.equals(2, d.month); |
| 56 expect$.Expect.equals(2, d.day); |
| 57 expect$.Expect.equals(3, d.hour); |
| 58 expect$.Expect.equals(0, d.minute); |
| 59 expect$.Expect.equals(0, d.second); |
| 60 expect$.Expect.equals(4, d.millisecond); |
| 61 d = new core.DateTime(-1, 2, 2, 3, 0, 4); |
| 62 expect$.Expect.equals(-1, d.year); |
| 63 expect$.Expect.equals(2, d.month); |
| 64 expect$.Expect.equals(2, d.day); |
| 65 expect$.Expect.equals(3, d.hour); |
| 66 expect$.Expect.equals(0, d.minute); |
| 67 expect$.Expect.equals(4, d.second); |
| 68 expect$.Expect.equals(0, d.millisecond); |
| 69 d = new core.DateTime(2012, 5, 15, 13, 21, 33, 12); |
| 70 expect$.Expect.equals(2012, d.year); |
| 71 expect$.Expect.equals(5, d.month); |
| 72 expect$.Expect.equals(15, d.day); |
| 73 expect$.Expect.equals(13, d.hour); |
| 74 expect$.Expect.equals(21, d.minute); |
| 75 expect$.Expect.equals(33, d.second); |
| 76 expect$.Expect.equals(12, d.millisecond); |
| 77 }; |
| 78 dart.fn(date_time5_test.main, VoidTodynamic()); |
| 79 // Exports: |
| 80 exports.date_time5_test = date_time5_test; |
| 81 }); |
OLD | NEW |