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

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

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