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

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

Issue 2727323002: Add @MirrorsUsed annotations to speed up tests. (Closed)
Patch Set: Minor fixes. Created 3 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
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library test.invoke_closurization_test; 5 library test.invoke_closurization_test;
6 6
7 @MirrorsUsed(targets: "test.invoke_closurization_test")
7 import 'dart:mirrors'; 8 import 'dart:mirrors';
8 9
9 import 'package:expect/expect.dart'; 10 import 'package:expect/expect.dart';
10 11
11 class A { 12 class A {
12 foo() => "foo"; 13 foo() => "foo";
13 bar([x]) => "bar-$x"; 14 bar([x]) => "bar-$x";
14 gee({named}) => "gee-$named"; 15 gee({named}) => "gee-$named";
15 16
16 // Methods that must be intercepted. 17 // Methods that must be intercepted.
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 Expect.equals("indexOf-499", f.invoke(#call, [499], {}).reflectee); 122 Expect.equals("indexOf-499", f.invoke(#call, [499], {}).reflectee);
122 f = getAMirror().getField(#matchAsPrefix); 123 f = getAMirror().getField(#matchAsPrefix);
123 Expect.equals("matchAsPrefix-FOO,BAR", 124 Expect.equals("matchAsPrefix-FOO,BAR",
124 f.invoke(#call, ["FOO", "BAR"]).reflectee); 125 f.invoke(#call, ["FOO", "BAR"]).reflectee);
125 f = getAMirror().getField(#toList); 126 f = getAMirror().getField(#toList);
126 Expect.equals("toList-1", 127 Expect.equals("toList-1",
127 f.invoke(#call, [], {#growable: 1}).reflectee); 128 f.invoke(#call, [], {#growable: 1}).reflectee);
128 f = getAMirror().getField(#toSet); 129 f = getAMirror().getField(#toSet);
129 Expect.equals("toSet-true", f.invoke(#call, [], {#named: true}).reflectee); 130 Expect.equals("toSet-true", f.invoke(#call, [], {#named: true}).reflectee);
130 } 131 }
OLDNEW
« no previous file with comments | « tests/lib/mirrors/invoke_call_through_implicit_getter_test.dart ('k') | tests/lib/mirrors/invoke_closurization_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698