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

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

Issue 12212016: Remove Expect from core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 library iterable_min_max_test; 5 library iterable_min_max_test;
6 6
7 import "package:expect/expect.dart";
7 import "dart:collection"; 8 import "dart:collection";
8 9
9 class C { 10 class C {
10 final x; 11 final x;
11 const C(this.x); 12 const C(this.x);
12 int get hashCode => x.hashCode; 13 int get hashCode => x.hashCode;
13 bool operator==(var other) => other is C && x == other.x; 14 bool operator==(var other) => other is C && x == other.x;
14 } 15 }
15 16
16 const inf = double.INFINITY; 17 const inf = double.INFINITY;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 Expect.equals(const C(10), IterableMixinWorkaround.max(new Set.from(cList), co mpareC)); 72 Expect.equals(const C(10), IterableMixinWorkaround.max(new Set.from(cList), co mpareC));
72 73
73 bool checkedMode = false; 74 bool checkedMode = false;
74 assert(checkedMode = true); 75 assert(checkedMode = true);
75 Expect.throws(cList.min, (e) => checkedMode ? e is TypeError 76 Expect.throws(cList.min, (e) => checkedMode ? e is TypeError
76 : e is NoSuchMethodError); 77 : e is NoSuchMethodError);
77 Expect.throws(cList.max, (e) => checkedMode ? e is TypeError 78 Expect.throws(cList.max, (e) => checkedMode ? e is TypeError
78 : e is NoSuchMethodError); 79 : e is NoSuchMethodError);
79 } 80 }
80 81
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698