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

Side by Side Diff: tests/lib/mirrors/parameter_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.parameter_metadata_test; 5 library test.parameter_metadata_test;
6 6
7 @MirrorsUsed(targets: "test.parameter_metadata_test")
7 import 'dart:mirrors'; 8 import 'dart:mirrors';
8 9
9 import 'metadata_test.dart'; 10 import 'metadata_test.dart';
10 11
11 const m1 = 'm1'; 12 const m1 = 'm1';
12 const m2 = #m2; 13 const m2 = #m2;
13 const m3 = const CustomAnnotation(3); 14 const m3 = const CustomAnnotation(3);
14 15
15 class CustomAnnotation { 16 class CustomAnnotation {
16 final value; 17 final value;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 checkMetadata(mm.parameters[0], []); 55 checkMetadata(mm.parameters[0], []);
55 checkMetadata(mm.parameters[1], []); 56 checkMetadata(mm.parameters[1], []);
56 57
57 mm = cm.declarations[#corge]; 58 mm = cm.declarations[#corge];
58 checkMetadata(mm.parameters[0], [m1]); 59 checkMetadata(mm.parameters[0], [m1]);
59 checkMetadata(mm.parameters[1], [m2]); 60 checkMetadata(mm.parameters[1], [m2]);
60 61
61 mm = cm.declarations[const Symbol('x=')]; 62 mm = cm.declarations[const Symbol('x=')];
62 checkMetadata(mm.parameters[0], [m2]); 63 checkMetadata(mm.parameters[0], [m2]);
63 } 64 }
OLDNEW
« no previous file with comments | « tests/lib/mirrors/parameter_is_const_test.dart ('k') | tests/lib/mirrors/parameter_of_mixin_app_constructor_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698