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

Side by Side Diff: tests/lib/mirrors/constructor_kinds_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.constructor_kinds_test; 5 library test.constructor_kinds_test;
6 6
7 @MirrorsUsed(targets: "test.constructor_kinds_test")
7 import 'dart:mirrors'; 8 import 'dart:mirrors';
8 import 'package:expect/expect.dart'; 9 import 'package:expect/expect.dart';
9 10
10 class ClassWithDefaultConstructor {} 11 class ClassWithDefaultConstructor {}
11 12
12 class Class { 13 class Class {
13 Class.generativeConstructor(); 14 Class.generativeConstructor();
14 Class.redirectingGenerativeConstructor() : this.generativeConstructor(); 15 Class.redirectingGenerativeConstructor() : this.generativeConstructor();
15 factory Class.factoryConstructor() => new Class.generativeConstructor(); 16 factory Class.factoryConstructor() => new Class.generativeConstructor();
16 factory Class.redirectingFactoryConstructor() = Class.factoryConstructor; 17 factory Class.redirectingFactoryConstructor() = Class.factoryConstructor;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 // Expect.isFalse(mm.isRedirectingConstructor); 103 // Expect.isFalse(mm.isRedirectingConstructor);
103 // Expect.isTrue(mm.isConstConstructor); 104 // Expect.isTrue(mm.isConstConstructor);
104 105
105 mm = cm.declarations[#Class.constRedirectingFactoryConstructor]; 106 mm = cm.declarations[#Class.constRedirectingFactoryConstructor];
106 Expect.isTrue(mm.isConstructor); 107 Expect.isTrue(mm.isConstructor);
107 Expect.isFalse(mm.isGenerativeConstructor); 108 Expect.isFalse(mm.isGenerativeConstructor);
108 Expect.isTrue(mm.isFactoryConstructor); 109 Expect.isTrue(mm.isFactoryConstructor);
109 Expect.isTrue(mm.isRedirectingConstructor); 110 Expect.isTrue(mm.isRedirectingConstructor);
110 Expect.isTrue(mm.isConstConstructor); 111 Expect.isTrue(mm.isConstConstructor);
111 } 112 }
OLDNEW
« no previous file with comments | « tests/lib/mirrors/closurization_equivalence_test.dart ('k') | tests/lib/mirrors/constructor_private_name_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698