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

Side by Side Diff: tests/lib/mirrors/reflect_model_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.reflect_model_test; 5 library test.reflect_model_test;
6 6
7 @MirrorsUsed(targets: "test.reflect_model_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 import 'model.dart'; 12 import 'model.dart';
12 import 'stringify.dart'; 13 import 'stringify.dart';
13 14
14 isNoSuchMethodError(e) => e is NoSuchMethodError; 15 isNoSuchMethodError(e) => e is NoSuchMethodError;
15 16
16 variablesOf(ClassMirror cm) { 17 variablesOf(ClassMirror cm) {
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 Expect.equals('aMethod', c.invoke(aMethod, []).reflectee); 133 Expect.equals('aMethod', c.invoke(aMethod, []).reflectee);
133 134
134 Expect.throws(() { a.invoke(bMethod, []); }, isNoSuchMethodError); 135 Expect.throws(() { a.invoke(bMethod, []); }, isNoSuchMethodError);
135 Expect.equals('bMethod', b.invoke(bMethod, []).reflectee); 136 Expect.equals('bMethod', b.invoke(bMethod, []).reflectee);
136 Expect.equals('bMethod', c.invoke(bMethod, []).reflectee); 137 Expect.equals('bMethod', c.invoke(bMethod, []).reflectee);
137 138
138 Expect.throws(() { a.invoke(cMethod, []); }, isNoSuchMethodError); 139 Expect.throws(() { a.invoke(cMethod, []); }, isNoSuchMethodError);
139 Expect.throws(() { b.invoke(cMethod, []); }, isNoSuchMethodError); 140 Expect.throws(() { b.invoke(cMethod, []); }, isNoSuchMethodError);
140 Expect.equals('cMethod', c.invoke(cMethod, []).reflectee); 141 Expect.equals('cMethod', c.invoke(cMethod, []).reflectee);
141 } 142 }
OLDNEW
« no previous file with comments | « tests/lib/mirrors/reflect_class_test.dart ('k') | tests/lib/mirrors/reflect_runtime_type_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698