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

Side by Side Diff: tests/corelib/sort_test.dart

Issue 11365196: Move JSSyntaxRegExp to core as a private member. This removes the last refrences to dart:coreimpl. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix two pending TODO's. Created 8 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 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // Dart test for sort routines. 5 // Dart test for sort routines.
6 library sort_test; 6 library sort_test;
7 import 'dart:coreimpl';
8 import 'sort_helper.dart'; 7 import 'sort_helper.dart';
9 8
10 main() { 9 main() {
11 var compare = (a, b) => a.compareTo(b); 10 var compare = (a, b) => a.compareTo(b);
12 var sort = (list) => list.sort(compare); 11 var sort = (list) => list.sort(compare);
13 new SortHelper(sort, compare).run(); 12 new SortHelper(sort, compare).run();
14 13
15 compare = (a, b) => -a.compareTo(b); 14 compare = (a, b) => -a.compareTo(b);
16 new SortHelper(sort, compare).run(); 15 new SortHelper(sort, compare).run();
17 16
(...skipping 21 matching lines...) Expand all
39 // The second partition will be big (more than 2/3 of the list), and an 38 // The second partition will be big (more than 2/3 of the list), and an
40 // optimization kicks in that removes the pivots from the partition. 39 // optimization kicks in that removes the pivots from the partition.
41 list = [0, 9, 0, 9, 3, 9, 0, 1/**/, 1, 0, 1, 9, 8, 2, 1, 40 list = [0, 9, 0, 9, 3, 9, 0, 1/**/, 1, 0, 1, 9, 8, 2, 1,
42 1/**/, 4, 5, 2, 5, 0, 1, 8/**/, 8, 8, 5, 2, 2, 9, 8/**/, 41 1/**/, 4, 5, 2, 5, 0, 1, 8/**/, 8, 8, 5, 2, 2, 9, 8/**/,
43 8, 4, 4, 1, 5, 3, 2, 8/**/, 5, 1, 2, 8, 5, 6, 8]; 42 8, 4, 4, 1, 5, 3, 2, 8/**/, 5, 1, 2, 8, 5, 6, 8];
44 list.sort(compare); 43 list.sort(compare);
45 Expect.listEquals(list, [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 44 Expect.listEquals(list, [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,
46 2, 2, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 45 2, 2, 2, 2, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 5,
47 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9]); 46 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9]);
48 } 47 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698