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

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

Issue 22894002: Increase expectedMethodCount to account for new methods from UnmodifiableMapView. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
« 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 10
(...skipping 30 matching lines...) Expand all
41 for (var element in generatedCode) { 41 for (var element in generatedCode) {
42 print(element); 42 print(element);
43 } 43 }
44 print(''); 44 print('');
45 45
46 // This assertion can fail for two reasons: 46 // This assertion can fail for two reasons:
47 // 1. Too many elements retained for reflection. 47 // 1. Too many elements retained for reflection.
48 // 2. Some code was refactored, and there are more methods. 48 // 2. Some code was refactored, and there are more methods.
49 // Either situation could be problematic, but in situation 2, it is often 49 // Either situation could be problematic, but in situation 2, it is often
50 // acceptable to increase [expectedMethodCount] a little. 50 // acceptable to increase [expectedMethodCount] a little.
51 int expectedMethodCount = 317; 51 int expectedMethodCount = 321;
52 Expect.isTrue( 52 Expect.isTrue(
53 generatedCode.length <= expectedMethodCount, 53 generatedCode.length <= expectedMethodCount,
54 'Too many compiled methods: ' 54 'Too many compiled methods: '
55 '${generatedCode.length} > $expectedMethodCount'); 55 '${generatedCode.length} > $expectedMethodCount');
56 56
57 // The following names should be retained: 57 // The following names should be retained:
58 List expectedNames = [ 58 List expectedNames = [
59 'Foo', // The name of class Foo. 59 'Foo', // The name of class Foo.
60 r'Foo$', // The name of class Foo's constructor. 60 r'Foo$', // The name of class Foo's constructor.
61 'Foo_staticMethod', // The name of Foo.staticMethod. 61 'Foo_staticMethod', // The name of Foo.staticMethod.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 library lib; 110 library lib;
111 111
112 import 'dart:mirrors'; 112 import 'dart:mirrors';
113 113
114 useReflect(type) { 114 useReflect(type) {
115 print(new Symbol('Foo')); 115 print(new Symbol('Foo'));
116 print(MirrorSystem.getName(reflectClass(type).owner.qualifiedName)); 116 print(MirrorSystem.getName(reflectClass(type).owner.qualifiedName));
117 } 117 }
118 """, 118 """,
119 }; 119 };
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