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

Side by Side Diff: tests/corelib/list_contains_argument_order_test.dart

Issue 2994543002: Migrated test block 13 to Dart 2.0. (Closed)
Patch Set: Address Bob's nits 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
« no previous file with comments | « tests/corelib/list_as_map_test.dart ('k') | tests/corelib/list_filled_type_argument_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 import "package:expect/expect.dart";
6
7 class A {
8 const A();
9 bool operator ==(Object other) {
10 return false;
11 }
12 }
13
14 class B {
15 bool operator ==(Object other) {
16 Expect.fail("Bad equality order.");
17 }
18 }
19
20 main() {
21 test(iterable) {
22 Expect.isFalse(iterable.contains(new B()));
23 }
24
25 var iterables = [
26 <A>[new A()],
27 new List<A>(1)..[0] = new A(),
28 new List<A>()..add(new A()),
29 const <A>[const A()],
30 new Set()..add(new A()),
31 (new Map()..[new A()] = 0).keys,
32 (new Map()..[0] = new A()).values
33 ];
34
35 for (var iterable in iterables) {
36 test(iterable);
37 test(iterable.map((x) => x));
38 test(iterable.take(1));
39 }
40 }
OLDNEW
« no previous file with comments | « tests/corelib/list_as_map_test.dart ('k') | tests/corelib/list_filled_type_argument_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698