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

Side by Side Diff: tests/compiler/dart2js/mirrors_used_test.dart

Issue 2700943002: Update method count in mirrors_used_test. (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /// Test that the @MirrorsUsed annotation suppress hints and that only 5 /// Test that the @MirrorsUsed annotation suppress hints and that only
6 /// requested elements are retained for reflection. 6 /// requested elements are retained for reflection.
7 library dart2js.test.mirrors_used_test; 7 library dart2js.test.mirrors_used_test;
8 8
9 import 'package:expect/expect.dart'; 9 import 'package:expect/expect.dart';
10 import "package:async_helper/async_helper.dart"; 10 import "package:async_helper/async_helper.dart";
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 for (var element in generatedCode) { 56 for (var element in generatedCode) {
57 print(element); 57 print(element);
58 } 58 }
59 print(''); 59 print('');
60 60
61 // This assertion can fail for two reasons: 61 // This assertion can fail for two reasons:
62 // 1. Too many elements retained for reflection. 62 // 1. Too many elements retained for reflection.
63 // 2. Some code was refactored, and there are more methods. 63 // 2. Some code was refactored, and there are more methods.
64 // Either situation could be problematic, but in situation 2, it is often 64 // Either situation could be problematic, but in situation 2, it is often
65 // acceptable to increase [expectedMethodCount] a little. 65 // acceptable to increase [expectedMethodCount] a little.
66 int expectedMethodCount = 466; 66 int expectedMethodCount = 476;
67 Expect.isTrue( 67 Expect.isTrue(
68 generatedCode.length <= expectedMethodCount, 68 generatedCode.length <= expectedMethodCount,
69 'Too many compiled methods: ' 69 'Too many compiled methods: '
70 '${generatedCode.length} > $expectedMethodCount'); 70 '${generatedCode.length} > $expectedMethodCount');
71 71
72 // The following names should be retained: 72 // The following names should be retained:
73 List expectedNames = [ 73 List expectedNames = [
74 'Foo', // The name of class Foo. 74 'Foo', // The name of class Foo.
75 r'Foo$', // The name of class Foo's constructor. 75 r'Foo$', // The name of class Foo's constructor.
76 r'get$field' 76 r'get$field'
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 library lib; 179 library lib;
180 180
181 import 'dart:mirrors'; 181 import 'dart:mirrors';
182 182
183 useReflect(type) { 183 useReflect(type) {
184 print(new Symbol('Foo')); 184 print(new Symbol('Foo'));
185 print(MirrorSystem.getName(reflectClass(type).owner.qualifiedName)); 185 print(MirrorSystem.getName(reflectClass(type).owner.qualifiedName));
186 } 186 }
187 """, 187 """,
188 }; 188 };
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698