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

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

Issue 11231074: Change signature of noSuchMethod to take an InvocationMirror. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: One more test expectation Created 8 years, 1 month 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
« no previous file with comments | « tests/corelib/core_runtime_types_test.dart ('k') | tests/language/language.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // When attempting to call a nonexistent static method, getter or setter, check 5 // When attempting to call a nonexistent static method, getter or setter, check
6 // that a NoSuchMethodError is thrown. 6 // that a NoSuchMethodError is thrown.
7 7
8 class C {} 8 class C {}
9 9
10 class D { 10 class D {
11 get hest => 1; /// 04: continued 11 get hest => 1; /// 04: continued
12 set hest(val) {} /// 05: continued 12 set hest(val) {} /// 05: continued
13 } 13 }
14 14
15 get fisk => 2; /// 09: continued 15 get fisk => 2; /// 09: continued
16 set fisk(val) {} /// 10: continued 16 set fisk(val) {} /// 10: continued
17 17
18 expectNsme([void fun()]) { 18 expectNsme([void fun()]) {
19 if (fun != null) { 19 if (fun != null) {
20 Expect.throws(fun, (e) => e is NoSuchMethodError); 20 Expect.throws(fun, (e) => e is NoSuchMethodError);
21 } 21 }
22 } 22 }
23 23
24 alwaysThrows() { 24 alwaysThrows() {
25 throw new NoSuchMethodError(null, 'foo', []); 25 throw new NoSuchMethodError(null, 'foo', [], {});
26 } 26 }
27 27
28 test01() { 28 test01() {
29 C.hest = 1; /// 01: static type warning 29 C.hest = 1; /// 01: static type warning
30 } 30 }
31 31
32 test02() { 32 test02() {
33 C.hest; /// 02: static type warning 33 C.hest; /// 02: static type warning
34 } 34 }
35 35
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 expectNsme( 91 expectNsme(
92 test08 /// 08: continued 92 test08 /// 08: continued
93 ); 93 );
94 expectNsme( 94 expectNsme(
95 test09 /// 09: continued 95 test09 /// 09: continued
96 ); 96 );
97 expectNsme( 97 expectNsme(
98 test10 /// 10: continued 98 test10 /// 10: continued
99 ); 99 );
100 } 100 }
OLDNEW
« no previous file with comments | « tests/corelib/core_runtime_types_test.dart ('k') | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698