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

Side by Side Diff: tests/lib/mirrors/invoke_private_wrong_library_test.dart

Issue 53883002: Ensure constructorName symbols include private manglings. (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
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 library test.invoke_test;
6
7 import 'dart:mirrors';
8
9 import 'package:expect/expect.dart';
10 import "package:async_helper/async_helper.dart";
11
12 import 'invoke_private_test.dart' show C;
13
14 expectThrowsNSM(f) {
15 Expect.throws(f, (e) => e is NoSuchMethodError);
16 }
17
18 main() {
19 var result;
20
21 C c = new C();
22 InstanceMirror im = reflect(c);
23 expectThrowsNSM(() => im.invoke(#_method, [2,4,8]));
24 expectThrowsNSM(() => im.getField(#_getter));
25 expectThrowsNSM(() => im.getField(#_field));
26 expectThrowsNSM(() => im.setField(#_setter, 'foo'));
27 expectThrowsNSM(() => im.setField(#_field, 'bar'));
28
29 ClassMirror cm = reflectClass(C);
30 expectThrowsNSM(() => cm.invoke(#_staticFunction, [3,4]));
31 expectThrowsNSM(() => cm.getField(#_staticGetter));
32 expectThrowsNSM(() => cm.getField(#_staticField));
33 expectThrowsNSM(() => cm.setField(#_staticSetter, 'sfoo'));
34 expectThrowsNSM(() => cm.setField(#_staticField, 'sbar'));
35 expectThrowsNSM(() => cm.newInstance(#_named, ['my value']));
36
37 LibraryMirror lm = cm.owner;
38 expectThrowsNSM(() => lm.invoke(#_libraryFunction, [':',')']));
39 expectThrowsNSM(() => lm.getField(#_libraryGetter));
40 expectThrowsNSM(() => lm.getField(#_libraryField));
41 expectThrowsNSM(() => lm.setField(#_librarySetter, 'lfoo'));
42 expectThrowsNSM(() => lm.setField(#_libraryField, 'lbar'));
43 }
OLDNEW
« no previous file with comments | « tests/lib/mirrors/constructor_private_name_test.dart ('k') | tests/lib/mirrors/repeated_private_anon_mixin_app1.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698