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

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

Issue 2225243003: Revert "Reapply fast-URI patch." (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 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
« no previous file with comments | « tests/compiler/dart2js/compiler_helper.dart ('k') | tests/corelib/data_uri_test.dart » ('j') | 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 for (var element in generatedCode) { 62 for (var element in generatedCode) {
63 print(element); 63 print(element);
64 } 64 }
65 print(''); 65 print('');
66 66
67 // This assertion can fail for two reasons: 67 // This assertion can fail for two reasons:
68 // 1. Too many elements retained for reflection. 68 // 1. Too many elements retained for reflection.
69 // 2. Some code was refactored, and there are more methods. 69 // 2. Some code was refactored, and there are more methods.
70 // Either situation could be problematic, but in situation 2, it is often 70 // Either situation could be problematic, but in situation 2, it is often
71 // acceptable to increase [expectedMethodCount] a little. 71 // acceptable to increase [expectedMethodCount] a little.
72 int expectedMethodCount = 466; 72 int expectedMethodCount = 432;
73 Expect.isTrue( 73 Expect.isTrue(
74 generatedCode.length <= expectedMethodCount, 74 generatedCode.length <= expectedMethodCount,
75 'Too many compiled methods: ' 75 'Too many compiled methods: '
76 '${generatedCode.length} > $expectedMethodCount'); 76 '${generatedCode.length} > $expectedMethodCount');
77 77
78 // The following names should be retained: 78 // The following names should be retained:
79 List expectedNames = [ 79 List expectedNames = [
80 'Foo', // The name of class Foo. 80 'Foo', // The name of class Foo.
81 r'Foo$', // The name of class Foo's constructor. 81 r'Foo$', // The name of class Foo's constructor.
82 r'get$field']; // The (getter) name of Foo.field. 82 r'get$field']; // The (getter) name of Foo.field.
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 library lib; 185 library lib;
186 186
187 import 'dart:mirrors'; 187 import 'dart:mirrors';
188 188
189 useReflect(type) { 189 useReflect(type) {
190 print(new Symbol('Foo')); 190 print(new Symbol('Foo'));
191 print(MirrorSystem.getName(reflectClass(type).owner.qualifiedName)); 191 print(MirrorSystem.getName(reflectClass(type).owner.qualifiedName));
192 } 192 }
193 """, 193 """,
194 }; 194 };
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/compiler_helper.dart ('k') | tests/corelib/data_uri_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698