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

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

Issue 2727323002: Add @MirrorsUsed annotations to speed up tests. (Closed)
Patch Set: 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.intercepted_superclass_test; 5 library test.intercepted_superclass_test;
6 6
7 @MirrorsUsed(targets: const [#String, #int, #double, #num, #bool, #List])
7 import 'dart:mirrors'; 8 import 'dart:mirrors';
8 import 'package:expect/expect.dart'; 9 import 'package:expect/expect.dart';
9 10
10 check(ClassMirror cm){ 11 check(ClassMirror cm){
11 Expect.isTrue(cm is ClassMirror); 12 Expect.isTrue(cm is ClassMirror);
12 Expect.isNotNull(cm); 13 Expect.isNotNull(cm);
13 } 14 }
14 15
15 main() { 16 main() {
16 check(reflect('').type.superclass); 17 check(reflect('').type.superclass);
17 check(reflect(1).type.superclass); 18 check(reflect(1).type.superclass);
18 check(reflect(1.5).type.superclass); 19 check(reflect(1.5).type.superclass);
19 check(reflect(true).type.superclass); 20 check(reflect(true).type.superclass);
20 check(reflect(false).type.superclass); 21 check(reflect(false).type.superclass);
21 check(reflect([]).type.superclass); 22 check(reflect([]).type.superclass);
22 23
23 check(reflectClass(String).superclass); 24 check(reflectClass(String).superclass);
24 check(reflectClass(int).superclass); 25 check(reflectClass(int).superclass);
25 check(reflectClass(double).superclass); 26 check(reflectClass(double).superclass);
26 check(reflectClass(num).superclass); 27 check(reflectClass(num).superclass);
27 check(reflectClass(bool).superclass); 28 check(reflectClass(bool).superclass);
28 check(reflectClass(List).superclass); 29 check(reflectClass(List).superclass);
29 } 30 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698