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

Unified Diff: tests/corelib_strong/sort_test.dart

Issue 2877683002: Adjust types in SplayTree implementation and some strong tests to (Closed)
Patch Set: Bind to variable to enable promotion Created 3 years, 7 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_strong/sort_test.dart
diff --git a/tests/corelib_strong/sort_test.dart b/tests/corelib_strong/sort_test.dart
index 3c1181892d7a83658eb447737a5fa4361e87ac7b..541b258d83be08df491eb26597cf32f420fa425f 100644
--- a/tests/corelib_strong/sort_test.dart
+++ b/tests/corelib_strong/sort_test.dart
@@ -9,11 +9,11 @@ import "package:expect/expect.dart";
import 'sort_helper.dart';
main() {
- var compare = (a, b) => a.compareTo(b);
- var sort = (list) => list.sort(compare);
+ var compare = (num a, num b) => a.compareTo(b);
+ var sort = (List<num> list) => list.sort(compare);
new SortHelper(sort, compare).run();
- compare = (a, b) => -a.compareTo(b);
+ compare = (num a, num b) => -a.compareTo(b);
new SortHelper(sort, compare).run();
var intCompare = (int a, int b) => a.compareTo(b);
@@ -68,7 +68,7 @@ main() {
2
];
list.sort(intCompare);
- Expect.listEquals(list, [
+ Expect.listEquals(list, <int>[
0,
0,
0,
@@ -164,7 +164,7 @@ main() {
2
];
list.sort(intCompare);
- Expect.listEquals(list, [
+ Expect.listEquals(list, <int>[
0,
0,
0,
@@ -263,7 +263,7 @@ main() {
8
];
list.sort(intCompare);
- Expect.listEquals(list, [
+ Expect.listEquals(list, <int>[
0,
0,
0,
« tests/corelib_strong/sort_helper.dart ('K') | « tests/corelib_strong/sort_helper.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698