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

Side by Side Diff: test/wrapper_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 /// Tests wrapper utilities. 5 /// Tests wrapper utilities.
6 6
7 import "dart:collection"; 7 import "dart:collection";
8 import "package:collection/collection.dart"; 8 import "package:collection/collection.dart";
9 import "package:unittest/unittest.dart"; 9 import "package:test/test.dart";
10 10
11 // Test that any member access/call on the wrapper object is equal to 11 // Test that any member access/call on the wrapper object is equal to
12 // an expected access on the wrapped object. 12 // an expected access on the wrapped object.
13 // This is implemented by capturing accesses using noSuchMethod and comparing 13 // This is implemented by capturing accesses using noSuchMethod and comparing
14 // them to expected accesses captured previously. 14 // them to expected accesses captured previously.
15 15
16 // Compare two Invocations for having equal type and arguments. 16 // Compare two Invocations for having equal type and arguments.
17 void testInvocations(Invocation i1, Invocation i2) { 17 void testInvocations(Invocation i1, Invocation i2) {
18 String name = "${i1.memberName}"; 18 String name = "${i1.memberName}";
19 expect(i1.isGetter, equals(i2.isGetter), reason: name); 19 expect(i1.isGetter, equals(i2.isGetter), reason: name);
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 655
656 test(".retainWhere", () { 656 test(".retainWhere", () {
657 map["f"] = "foo"; 657 map["f"] = "foo";
658 map["b"] = "bar"; 658 map["b"] = "bar";
659 map["q"] = "qoo"; 659 map["q"] = "qoo";
660 set.retainWhere((element) => element.endsWith("o")); 660 set.retainWhere((element) => element.endsWith("o"));
661 expect(map, equals({"f": "foo", "q": "qoo"})); 661 expect(map, equals({"f": "foo", "q": "qoo"}));
662 }); 662 });
663 }); 663 });
664 } 664 }
OLDNEW
« test/equality_test.dart ('K') | « test/unmodifiable_collection_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698