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

Side by Side Diff: runtime/tests/vm/dart/mirrored_compilation_error_test.dart

Issue 64793003: Update mirror tests for removed API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: . Created 7 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 | « no previous file | tests/compiler/dart2js/message_kind_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
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 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 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 // VMOptions=--use_mirrored_compilation_error=true 5 // VMOptions=--use_mirrored_compilation_error=true
6 6
7 @notDefined 7 @notDefined
8 library mirrored_compilation_error_test; 8 library mirrored_compilation_error_test;
9 9
10 import 'dart:mirrors'; 10 import 'dart:mirrors';
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 return true; 57 return true;
58 } 58 }
59 } 59 }
60 60
61 main() { 61 main() {
62 62
63 // Metadata. 63 // Metadata.
64 64
65 raises(() => reflectClass(Class).metadata); 65 raises(() => reflectClass(Class).metadata);
66 raises(() => reflectClass(Class).typeVariables.single.metadata); 66 raises(() => reflectClass(Class).typeVariables.single.metadata);
67 raises(() => reflectClass(Class).variables[#field].metadata); 67 raises(() => reflectClass(Class).declarations[#field].metadata);
68 raises(() => reflectClass(Class).methods[#method].metadata); 68 raises(() => reflectClass(Class).declarations[#method].metadata);
69 raises(() => reflectClass(Class).methods[#method].parameters.single.metadata); 69 raises(() => reflectClass(Class).declarations[#method].parameters.single.metad ata);
70 raises(() => reflectClass(Class).owner.metadata); 70 raises(() => reflectClass(Class).owner.metadata);
71 71
72 72
73 // Invocation. 73 // Invocation.
74 74
75 InstanceMirror im = reflect(new Class2()); 75 InstanceMirror im = reflect(new Class2());
76 raises(() => im.invoke(#method, [])); 76 raises(() => im.invoke(#method, []));
77 raises(() => im.getField(#getter)); 77 raises(() => im.getField(#getter));
78 raises(() => im.setField(#setter, 'some value')); 78 raises(() => im.setField(#setter, 'some value'));
79 // The implementation is within its right to defer the compilation even 79 // The implementation is within its right to defer the compilation even
(...skipping 14 matching lines...) Expand all
94 raises(() => lm.getField(#toplevelFunction).apply([])); 94 raises(() => lm.getField(#toplevelFunction).apply([]));
95 95
96 96
97 // Bounds violation. 97 // Bounds violation.
98 98
99 if (inCheckedMode) { 99 if (inCheckedMode) {
100 ClassMirror cm = reflect(new G<int, String>()).type; 100 ClassMirror cm = reflect(new G<int, String>()).type;
101 raises(() => cm.newInstance(#swap, [])); 101 raises(() => cm.newInstance(#swap, []));
102 } 102 }
103 } 103 }
OLDNEW
« no previous file with comments | « no previous file | tests/compiler/dart2js/message_kind_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698