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

Unified Diff: tests/corelib/list_sort_test.dart

Issue 11144016: Make argument of List.sort optional with default Comparable.compare. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: tests/corelib/list_sort_test.dart
diff --git a/tests/corelib/list_sort_test.dart b/tests/corelib/list_sort_test.dart
index 48e0b0cecc04cf37b390c46cc89307daf02b9f85..cc8cd03eb5b015d04dcae7e355ac112e343b68ab 100644
--- a/tests/corelib/list_sort_test.dart
+++ b/tests/corelib/list_sort_test.dart
@@ -7,10 +7,12 @@
class ListSortTest {
static void testMain() {
- var compare = (a, b) => a.compareTo(b);
+ var compare = Comparable.compare;
var sort = (list) => list.sort(compare);
new SortHelper(sort, compare).run();
+ new SortHelper((list)=>list.sort(), compare).run();
ngeoffray 2012/10/15 14:17:12 spaces around the '=>'
Lasse Reichstein Nielsen 2012/10/17 07:37:28 Done.
+
compare = (a, b) => -a.compareTo(b);
new SortHelper(sort, compare).run();
}
« lib/compiler/implementation/lib/interceptors.dart ('K') | « runtime/lib/growable_array.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698