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

Side by Side Diff: tests/corelib_2/splay_tree_test.dart

Issue 2983383002: Migrated test block 26 to Dart 2.0. (Closed)
Patch Set: Updated splay_tree_from_iterables_test to not check for checked mode, and updated status files acco… 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 // Dart test for Splaytrees. 5 // Dart test for Splaytrees.
6 library splay_tree_test; 6 library splay_tree_test;
7 7
8 import "package:expect/expect.dart"; 8 import "package:expect/expect.dart";
9 import 'dart:collection'; 9 import 'dart:collection';
10 10
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 for (int i = 0; i < 3; i++) { 118 for (int i = 0; i < 3; i++) {
119 Expect.isTrue(map.containsKey(key(i))); 119 Expect.isTrue(map.containsKey(key(i)));
120 Expect.equals(i, map[key(i)]); 120 Expect.equals(i, map[key(i)]);
121 } 121 }
122 Expect.isFalse(map.containsKey(key(5))); 122 Expect.isFalse(map.containsKey(key(5)));
123 Expect.isFalse(map.containsKey(1)); 123 Expect.isFalse(map.containsKey(1));
124 Expect.isFalse(map.containsKey("string")); 124 Expect.isFalse(map.containsKey("string"));
125 Expect.equals(null, map[key(5)]); 125 Expect.equals(null, map[key(5)]);
126 Expect.equals(null, map[1]); 126 Expect.equals(null, map[1]);
127 Expect.equals(null, map["string"]); 127 Expect.equals(null, map["string"]);
128 Expect.throws(() { 128 map[1] = 42; //# 01: compile-time error
129 map[1] = 42; 129 map["string"] = 42; //# 02: compile-time error
130 });
131 Expect.throws(() {
132 map["string"] = 42;
133 });
134 map[key(5)] = 42; 130 map[key(5)] = 42;
135 Expect.equals(4, map.length); 131 Expect.equals(4, map.length);
136 Expect.equals(42, map[key(5)]); 132 Expect.equals(42, map[key(5)]);
137 } 133 }
138 134
139 class IncomparableKey { 135 class IncomparableKey {
140 final int id; 136 final int id;
141 IncomparableKey(this.id); 137 IncomparableKey(this.id);
142 } 138 }
OLDNEW
« no previous file with comments | « tests/corelib_2/splay_tree_from_iterables_test.dart ('k') | tests/corelib_strong/corelib_strong.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698