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

Side by Side Diff: tests/corelib_2/sort_helper.dart

Issue 2989993002: fix unsound cast failures in tests (Closed)
Patch Set: fix Created 3 years, 4 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
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 library sort_helper; 5 library sort_helper;
6 6
7 import "package:expect/expect.dart"; 7 import "package:expect/expect.dart";
8 8
9 typedef Sorter 9 typedef Sorter = void Function(List<num>);
10 = void Function(List<num>); 10 typedef Comparer = int Function(num, num);
11 typedef Comparer
12 = int Function(num, num);
13 11
14 class SortHelper { 12 class SortHelper {
15 SortHelper(this.sortFunction, this.compareFunction) {} 13 SortHelper(this.sortFunction, this.compareFunction) {}
16 14
17 void run() { 15 void run() {
18 testSortIntLists(); 16 testSortIntLists();
19 testSortDoubleLists(); 17 testSortDoubleLists();
20 } 18 }
21 19
22 bool isSorted(List<num> a) { 20 bool isSorted(List<num> a) {
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 146
149 for (int i = 0; i < a.length; i++) { 147 for (int i = 0; i < a.length; i++) {
150 a[i] = 1.5; 148 a[i] = 1.5;
151 } 149 }
152 testSort(a); 150 testSort(a);
153 } 151 }
154 152
155 Sorter sortFunction; 153 Sorter sortFunction;
156 Comparer compareFunction; 154 Comparer compareFunction;
157 } 155 }
OLDNEW
« no previous file with comments | « pkg/dev_compiler/test/browser/language_tests.js ('k') | tests/corelib_strong/iterable_empty_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698