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

Side by Side Diff: tests/lib/mirrors/metadata_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) 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 library test.metadata_test; 5 library test.metadata_test;
6 6
7 @MirrorsUsed(targets: "test.metadata_test")
7 import 'dart:mirrors'; 8 import 'dart:mirrors';
8 9
9 const string = 'a metadata string'; 10 const string = 'a metadata string';
10 11
11 const symbol = const Symbol('symbol'); 12 const symbol = const Symbol('symbol');
12 13
13 const hest = 'hest'; 14 const hest = 'hest';
14 15
15 @symbol @string 16 @symbol @string
16 class MyClass { 17 class MyClass {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 checkMetadata(method, []); 63 checkMetadata(method, []);
63 64
64 VariableMirror xMirror = myClassMirror.declarations[#x]; 65 VariableMirror xMirror = myClassMirror.declarations[#x];
65 checkMetadata(xMirror, [hest, hest, symbol]); 66 checkMetadata(xMirror, [hest, hest, symbol]);
66 67
67 VariableMirror yMirror = myClassMirror.declarations[#y]; 68 VariableMirror yMirror = myClassMirror.declarations[#y];
68 checkMetadata(yMirror, []); 69 checkMetadata(yMirror, []);
69 70
70 // TODO(ahe): Test local functions. 71 // TODO(ahe): Test local functions.
71 } 72 }
OLDNEW
« no previous file with comments | « tests/lib/mirrors/metadata_scope_test.dart ('k') | tests/lib/mirrors/method_mirror_name_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698