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

Unified Diff: tests/corelib_2/iterable_reduce_test.dart

Issue 3000543002: Migrate test block 11 to Dart 2.0. (Closed)
Patch Set: Fix merge problems and update test status with head changes 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/corelib_2/iterable_mapping_test.dart ('k') | tests/corelib_2/iterable_return_type_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib_2/iterable_reduce_test.dart
diff --git a/tests/corelib/iterable_reduce_test.dart b/tests/corelib_2/iterable_reduce_test.dart
similarity index 90%
rename from tests/corelib/iterable_reduce_test.dart
rename to tests/corelib_2/iterable_reduce_test.dart
index 755a749eb92fca4f4fe9978cab00f6cc6adf44ca..460bf859f0fcb384fb0e3621c303aab86ca17b10 100644
--- a/tests/corelib/iterable_reduce_test.dart
+++ b/tests/corelib_2/iterable_reduce_test.dart
@@ -36,10 +36,10 @@ main() {
new List.generate(3, (x) => x + 1),
[0, 1, 2, 3].where((x) => x > 0),
[0, 1, 2].map((x) => x + 1),
- [
- [1, 2],
- [3]
- ].expand(id),
+ [ //# 01: ok
+ [1, 2], //# 01: ok
+ [3] //# 01: ok
+ ].expand(id), //# 01: ok
[3, 2, 1].reversed,
[0, 1, 2, 3].skip(1),
[1, 2, 3, 4].take(3),
@@ -75,12 +75,12 @@ main() {
new MyList([1, 2, 3]),
]) {
int callCount = 0;
- var result = iterable.reduce((x, y) {
- callCount++;
- return x + y;
- });
- Expect.equals(6, result, "${iterable.runtimeType}");
- Expect.equals(2, callCount);
+ var result = iterable.reduce((x, y) { //# 01: ok
+ callCount++; //# 01: ok
+ return x + y; //# 01: ok
+ }); //# 01: ok
+ Expect.equals(6, result, "${iterable.runtimeType}"); //# 01: ok
+ Expect.equals(2, callCount); //# 01: ok
}
// Empty iterables not allowed.
@@ -94,7 +94,7 @@ main() {
new List.generate(0, (x) => x + 1),
[0, 1, 2, 3].where((x) => false),
[].map((x) => x + 1),
- [[], []].expand(id),
+ [[], []].expand(id), //# 01: ok
[].reversed,
[0, 1, 2, 3].skip(4),
[1, 2, 3, 4].take(0),
@@ -126,10 +126,10 @@ main() {
new List.generate(1, (x) => x + 1),
[0, 1, 2, 3].where((x) => x == 1),
[0].map((x) => x + 1),
- [
- [],
- [1]
- ].expand(id),
+ [ //# 01: ok
+ [], //# 01: ok
+ [1] //# 01: ok
+ ].expand(id), //# 01: ok
[1].reversed,
[0, 1].skip(1),
[1, 2, 3, 4].take(1),
@@ -145,7 +145,7 @@ main() {
"\x01".runes,
new MyList([1]),
]) {
- Expect.equals(1, iterable.reduce((x, y) => throw "Unreachable"));
+ Expect.equals(1, iterable.reduce((x, y) => throw "Unreachable")); //# 01: ok
}
// Concurrent modifications not allowed.
« no previous file with comments | « tests/corelib_2/iterable_mapping_test.dart ('k') | tests/corelib_2/iterable_return_type_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698