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

Unified Diff: tests/corelib_strong/sort_test.dart

Issue 2771453003: Format all tests. (Closed)
Patch Set: Format files Created 3 years, 8 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 72e11a49ff1d2817b01cb3bc914d6fe2adea83ce..ac7d931075085bef0432f8564af951cfbcb9fd8b 100644
--- a/tests/corelib_strong/sort_test.dart
+++ b/tests/corelib_strong/sort_test.dart
@@ -4,6 +4,7 @@
// Dart test for sort routines.
library sort_test;
+
import "package:expect/expect.dart";
import 'sort_helper.dart';
@@ -19,30 +20,294 @@ main() {
// Pivot-canditate indices: 7, 15, 22, 29, 37
// Test dutch flag partitioning (canditates 2 and 4 are the same).
- var list = [0, 0, 0, 0, 0, 0, 0, 0/**/, 0, 0, 0, 0, 0, 0, 0,
- 1/**/, 1, 1, 1, 1, 1, 1, 1/**/, 1, 1, 1, 1, 1, 1, 1/**/,
- 2, 2, 2, 2, 2, 2, 2, 2/**/, 2, 2, 2, 2, 2, 2, 2];
+ var list = [
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0 /**/,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1 /**/,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1 /**/,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1 /**/,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2 /**/,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2
+ ];
list.sort(intCompare);
- Expect.listEquals(list, [0, 0, 0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
+ 0,
+ 0,
+ 0,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 1,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 2,
+ 3,
+ 3,
+ 4,
+ 4,
+ 4,
+ 5,
+ 5,
+ 5,
+ 5,
+ 5,
+ 5,
+ 6,
+ 8,
+ 8,
+ 8,
+ 8,
+ 8,
+ 8,
+ 8,
+ 8,
+ 8,
+ 9,
+ 9,
+ 9,
+ 9,
+ 9
+ ]);
}

Powered by Google App Engine
This is Rietveld 408576698