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

Side by Side Diff: test/canonicalized_map_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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 "package:collection/collection.dart"; 5 import "package:collection/collection.dart";
6 import "package:unittest/unittest.dart"; 6 import "package:test/test.dart";
7 7
8 void main() { 8 void main() {
9 group("with an empty canonicalized map", () { 9 group("with an empty canonicalized map", () {
10 var map; 10 var map;
11 setUp(() { 11 setUp(() {
12 map = new CanonicalizedMap<int, String, String>(int.parse, 12 map = new CanonicalizedMap<int, String, String>(int.parse,
13 isValidKey: new RegExp(r"^\d+$").hasMatch); 13 isValidKey: new RegExp(r"^\d+$").hasMatch);
14 }); 14 });
15 15
16 test("canonicalizes keys on set and get", () { 16 test("canonicalizes keys on set and get", () {
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 var map = new CanonicalizedMap.from({ 157 var map = new CanonicalizedMap.from({
158 "1": "value 1", 158 "1": "value 1",
159 "01": "value 2", 159 "01": "value 2",
160 "001": "value 3" 160 "001": "value 3"
161 }, int.parse); 161 }, int.parse);
162 expect(map.length, equals(1)); 162 expect(map.length, equals(1));
163 expect(map["0001"], equals("value 3")); 163 expect(map["0001"], equals("value 3"));
164 }); 164 });
165 }); 165 });
166 } 166 }
OLDNEW
« no previous file with comments | « test/algorithms_test.dart ('k') | test/equality_test.dart » ('j') | test/equality_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698