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

Side by Side Diff: test/iterable_zip_test.dart

Issue 1213723007: Update to test package, make test work on dart2js. (Closed) Base URL: https://github.com/dart-lang/collection.git@master
Patch Set: Also update version. Created 5 years, 5 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 import "dart:collection"; 5 import "dart:collection";
6 import "package:collection/iterable_zip.dart"; 6 import "package:collection/iterable_zip.dart";
7 import "package:unittest/unittest.dart"; 7 import "package:test/test.dart";
8 8
9 /// Iterable like [base] except that it throws when value equals [errorValue]. 9 /// Iterable like [base] except that it throws when value equals [errorValue].
10 Iterable iterError(Iterable base, int errorValue) { 10 Iterable iterError(Iterable base, int errorValue) {
11 return base.map((x) => x == errorValue ? throw "BAD" : x); 11 return base.map((x) => x == errorValue ? throw "BAD" : x);
12 } 12 }
13 13
14 main() { 14 main() {
15 test("Basic", () { 15 test("Basic", () {
16 expect(new IterableZip([[1, 2, 3], [4, 5, 6], [7, 8, 9]]), 16 expect(new IterableZip([[1, 2, 3], [4, 5, 6], [7, 8, 9]]),
17 equals([[1, 4, 7], [2, 5, 8], [3, 6, 9]])); 17 equals([[1, 4, 7], [2, 5, 8], [3, 6, 9]]));
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 throwsA(equals("BAD"))); 103 throwsA(equals("BAD")));
104 }); 104 });
105 105
106 test("Error after first end", () { 106 test("Error after first end", () {
107 expect(new IterableZip([[1, 2, 3], 107 expect(new IterableZip([[1, 2, 3],
108 [4, 5, 6], 108 [4, 5, 6],
109 iterError([7, 8, 9, 10], 10)]), 109 iterError([7, 8, 9, 10], 10)]),
110 equals([[1, 4, 7], [2, 5, 8], [3, 6, 9]])); 110 equals([[1, 4, 7], [2, 5, 8], [3, 6, 9]]));
111 }); 111 });
112 } 112 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698