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

Side by Side Diff: tests/language/invocation_mirror_test.dart

Issue 12212016: Remove Expect from core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add deprecation comment for ExpectException and revert one test. Created 7 years, 8 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 import "package:expect/expect.dart";
6
5 // InvocationMirror and noSuchMethod testing. 7 // InvocationMirror and noSuchMethod testing.
6 8
7 /** Class with noSuchMethod that returns the mirror */ 9 /** Class with noSuchMethod that returns the mirror */
8 class N { 10 class N {
9 // Storage for the last argument to noSuchMethod. 11 // Storage for the last argument to noSuchMethod.
10 // Needed for setters, which don't evaluate to the return value. 12 // Needed for setters, which don't evaluate to the return value.
11 var last; 13 var last;
12 noSuchMethod(InvocationMirror m) => last = m; 14 noSuchMethod(InvocationMirror m) => last = m;
13 15
14 flif(int x) { Expect.fail("never get here"); } 16 flif(int x) { Expect.fail("never get here"); }
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 test(() => o.hashCode = 42); 237 test(() => o.hashCode = 42);
236 test(() => o.hashCode()); // Thrown by int.noSuchMethod. 238 test(() => o.hashCode()); // Thrown by int.noSuchMethod.
237 test(() => (n.flif)()); // Extracted method has no noSuchMethod. 239 test(() => (n.flif)()); // Extracted method has no noSuchMethod.
238 } 240 }
239 241
240 main() { 242 main() {
241 testInvocationMirrors(); 243 testInvocationMirrors();
242 testNoSuchMethodErrors(); 244 testNoSuchMethodErrors();
243 new M().testSuperCalls(); 245 new M().testSuperCalls();
244 } 246 }
OLDNEW
« no previous file with comments | « tests/language/invocation_mirror_invoke_on_test.dart ('k') | tests/language/is_function_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698