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

Side by Side Diff: pkg/analyzer/lib/src/generated/java_core.dart

Issue 630513002: Uncomment and clean up all_the_rest.dart tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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
« no previous file with comments | « pkg/analyzer/lib/src/generated/html.dart ('k') | pkg/analyzer/lib/src/generated/resolver.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 library java.core; 1 library java.core;
2 2
3 import "dart:math" as math; 3 import "dart:math" as math;
4 4
5 final Stopwatch nanoTimeStopwatch = new Stopwatch(); 5 final Stopwatch nanoTimeStopwatch = new Stopwatch();
6 6
7 const int LONG_MAX_VALUE = 0x7fffffffffffffff;
8
7 class JavaSystem { 9 class JavaSystem {
8 static int currentTimeMillis() { 10 static int currentTimeMillis() {
9 return (new DateTime.now()).millisecondsSinceEpoch; 11 return (new DateTime.now()).millisecondsSinceEpoch;
10 } 12 }
11 13
12 static int nanoTime() { 14 static int nanoTime() {
13 if (!nanoTimeStopwatch.isRunning) { 15 if (!nanoTimeStopwatch.isRunning) {
14 nanoTimeStopwatch.start(); 16 nanoTimeStopwatch.start();
15 } 17 }
16 return nanoTimeStopwatch.elapsedMicroseconds * 1000; 18 return nanoTimeStopwatch.elapsedMicroseconds * 1000;
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 } 266 }
265 267
266 static String repeat(String s, int n) { 268 static String repeat(String s, int n) {
267 StringBuffer sb = new StringBuffer(); 269 StringBuffer sb = new StringBuffer();
268 for (int i = 0; i < n; i++) { 270 for (int i = 0; i < n; i++) {
269 sb.write(s); 271 sb.write(s);
270 } 272 }
271 return sb.toString(); 273 return sb.toString();
272 } 274 }
273 275
274 static List<String> split(String s, [String pattern = '']) { 276 static List<String> split(String s, [String pattern = ' ']) {
275 return s.split(pattern); 277 return s.split(pattern);
276 } 278 }
277 279
278 static List<String> splitByWholeSeparatorPreserveAllTokens(String s, String 280 static List<String> splitByWholeSeparatorPreserveAllTokens(String s, String
279 pattern) { 281 pattern) {
280 return s.split(pattern); 282 return s.split(pattern);
281 } 283 }
282 } 284 }
283 285
284 class Math { 286 class Math {
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 * format('{0} are you {1}ing?', ['What', 'read']) = 'What are you reading?' 539 * format('{0} are you {1}ing?', ['What', 'read']) = 'What are you reading?'
538 */ 540 */
539 String formatList(String pattern, List args) { 541 String formatList(String pattern, List args) {
540 return pattern.replaceAllMapped(new RegExp(r'\{(\d+)\}'), (match) { 542 return pattern.replaceAllMapped(new RegExp(r'\{(\d+)\}'), (match) {
541 String indexStr = match.group(1); 543 String indexStr = match.group(1);
542 int index = int.parse(indexStr); 544 int index = int.parse(indexStr);
543 var arg = args[index]; 545 var arg = args[index];
544 return arg != null ? arg.toString() : null; 546 return arg != null ? arg.toString() : null;
545 }); 547 });
546 } 548 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/html.dart ('k') | pkg/analyzer/lib/src/generated/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698