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

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

Issue 674223006: Translate Engine utilities tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 library java.engine; 1 library java.engine;
2 2
3 import 'interner.dart'; 3 import 'interner.dart';
4 import 'java_core.dart'; 4 import 'java_core.dart';
5 5
6 /** 6 /**
7 * A predicate is a one-argument function that returns a boolean value. 7 * A predicate is a one-argument function that returns a boolean value.
8 */ 8 */
9 typedef bool Predicate<E>(E argument); 9 typedef bool Predicate<E>(E argument);
10 10
(...skipping 22 matching lines...) Expand all
33 } 33 }
34 return true; 34 return true;
35 } 35 }
36 static bool isEmpty(String s) { 36 static bool isEmpty(String s) {
37 return s == null || s.isEmpty; 37 return s == null || s.isEmpty;
38 } 38 }
39 static String substringBefore(String str, String separator) { 39 static String substringBefore(String str, String separator) {
40 if (str == null || str.isEmpty) { 40 if (str == null || str.isEmpty) {
41 return str; 41 return str;
42 } 42 }
43 if (separator == null) {
44 return str;
45 }
43 int pos = str.indexOf(separator); 46 int pos = str.indexOf(separator);
44 if (pos < 0) { 47 if (pos < 0) {
45 return str; 48 return str;
46 } 49 }
47 return str.substring(0, pos); 50 return str.substring(0, pos);
48 } 51 }
49 static endsWithChar(String str, int c) { 52 static endsWithChar(String str, int c) {
50 int length = str.length; 53 int length = str.length;
51 return length > 0 && str.codeUnitAt(length - 1) == c; 54 return length > 0 && str.codeUnitAt(length - 1) == c;
52 } 55 }
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 if (cause != null) { 328 if (cause != null) {
326 buffer.write('Caused by '); 329 buffer.write('Caused by ');
327 cause._writeOn(buffer); 330 cause._writeOn(buffer);
328 } 331 }
329 } else { 332 } else {
330 buffer.writeln(exception.toString()); 333 buffer.writeln(exception.toString());
331 buffer.writeln(stackTrace.toString()); 334 buffer.writeln(stackTrace.toString());
332 } 335 }
333 } 336 }
334 } 337 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698