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

Side by Side Diff: tests/lib/mirrors/hot_set_field_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.hot_set_field; 5 library test.hot_set_field;
6 6
7 @MirrorsUsed(targets: "test.hot_set_field")
7 import 'dart:mirrors'; 8 import 'dart:mirrors';
8 import 'package:expect/expect.dart'; 9 import 'package:expect/expect.dart';
9 10
10 class C { 11 class C {
11 var field; 12 var field;
12 var _field; 13 var _field;
13 } 14 }
14 15
15 const int optimizationThreshold = 20; 16 const int optimizationThreshold = 20;
16 17
(...skipping 25 matching lines...) Expand all
42 for (int i = 0; i < (2 * optimizationThreshold); i++) { 43 for (int i = 0; i < (2 * optimizationThreshold); i++) {
43 Expect.throws(() => im.setField(selector, i), (e) => e is NoSuchMethodError) ; 44 Expect.throws(() => im.setField(selector, i), (e) => e is NoSuchMethodError) ;
44 } 45 }
45 } 46 }
46 47
47 main() { 48 main() {
48 testPublic(); 49 testPublic();
49 testPrivate(); 50 testPrivate();
50 testPrivateWrongLibrary(); 51 testPrivateWrongLibrary();
51 } 52 }
OLDNEW
« no previous file with comments | « tests/lib/mirrors/hot_get_field_test.dart ('k') | tests/lib/mirrors/inference_and_no_such_method_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698