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

Side by Side Diff: test/dart_codegen/expect/core/duration.dart

Issue 961493003: don't run dart gen on JS patch code (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « test/dart_codegen/expect/core/double.dart ('k') | test/dart_codegen/expect/core/errors.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 part of dart.core; 1 part of dart.core;
2 2
3 class Duration implements Comparable<Duration> { 3 class Duration implements Comparable<Duration> {
4 static const int MICROSECONDS_PER_MILLISECOND = 1000; 4 static const int MICROSECONDS_PER_MILLISECOND = 1000;
5 static const int MILLISECONDS_PER_SECOND = 1000; 5 static const int MILLISECONDS_PER_SECOND = 1000;
6 static const int SECONDS_PER_MINUTE = 60; 6 static const int SECONDS_PER_MINUTE = 60;
7 static const int MINUTES_PER_HOUR = 60; 7 static const int MINUTES_PER_HOUR = 60;
8 static const int HOURS_PER_DAY = 24; 8 static const int HOURS_PER_DAY = 24;
9 static const int MICROSECONDS_PER_SECOND = 9 static const int MICROSECONDS_PER_SECOND =
10 MICROSECONDS_PER_MILLISECOND * MILLISECONDS_PER_SECOND; 10 MICROSECONDS_PER_MILLISECOND * MILLISECONDS_PER_SECOND;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 if (n >= 10) return "0000$n"; 70 if (n >= 10) return "0000$n";
71 return "00000$n"; 71 return "00000$n";
72 } 72 }
73 String twoDigits(int n) { 73 String twoDigits(int n) {
74 if (n >= 10) return "$n"; 74 if (n >= 10) return "$n";
75 return "0$n"; 75 return "0$n";
76 } 76 }
77 if (inMicroseconds < 0) { 77 if (inMicroseconds < 0) {
78 return "-${-this}"; 78 return "-${-this}";
79 } 79 }
80 String twoDigitMinutes = twoDigits(((__x11) => DDC$RT.cast(__x11, num, int, 80 String twoDigitMinutes = twoDigits(((__x0) => DDC$RT.cast(__x0, num, int,
81 "CastGeneral", """line 258, column 40 of dart:core/duration.dart: """, 81 "CastGeneral", """line 258, column 40 of dart:core/duration.dart: """,
82 __x11 is int, true))(inMinutes.remainder(MINUTES_PER_HOUR))); 82 __x0 is int, true))(inMinutes.remainder(MINUTES_PER_HOUR)));
83 String twoDigitSeconds = twoDigits(((__x12) => DDC$RT.cast(__x12, num, int, 83 String twoDigitSeconds = twoDigits(((__x1) => DDC$RT.cast(__x1, num, int,
84 "CastGeneral", """line 259, column 40 of dart:core/duration.dart: """, 84 "CastGeneral", """line 259, column 40 of dart:core/duration.dart: """,
85 __x12 is int, true))(inSeconds.remainder(SECONDS_PER_MINUTE))); 85 __x1 is int, true))(inSeconds.remainder(SECONDS_PER_MINUTE)));
86 String sixDigitUs = sixDigits(((__x13) => DDC$RT.cast(__x13, num, int, 86 String sixDigitUs = sixDigits(((__x2) => DDC$RT.cast(__x2, num, int,
87 "CastGeneral", """line 261, column 19 of dart:core/duration.dart: """, 87 "CastGeneral", """line 261, column 19 of dart:core/duration.dart: """,
88 __x13 is int, 88 __x2 is int, true))(inMicroseconds.remainder(MICROSECONDS_PER_SECOND)));
89 true))(inMicroseconds.remainder(MICROSECONDS_PER_SECOND)));
90 return "$inHours:$twoDigitMinutes:$twoDigitSeconds.$sixDigitUs"; 89 return "$inHours:$twoDigitMinutes:$twoDigitSeconds.$sixDigitUs";
91 } 90 }
92 bool get isNegative => _duration < 0; 91 bool get isNegative => _duration < 0;
93 Duration abs() => new Duration._microseconds(_duration.abs()); 92 Duration abs() => new Duration._microseconds(_duration.abs());
94 Duration operator -() => new Duration._microseconds(-_duration); 93 Duration operator -() => new Duration._microseconds(-_duration);
95 } 94 }
OLDNEW
« no previous file with comments | « test/dart_codegen/expect/core/double.dart ('k') | test/dart_codegen/expect/core/errors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698