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

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

Issue 26651006: Switch dart2js 'typedef name = mixinApplication' to 'class name = mixinApplication'. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Use reportWarningCode instead of reportWarning, which is going away at some point. Created 7 years, 2 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 | « tests/compiler/dart2js/analyze_dart2js_test.dart ('k') | tests/language/language.status » ('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 17 matching lines...) Expand all
28 void expectOnlyVerboseInfo(Uri uri, int begin, int end, String message, kind) { 28 void expectOnlyVerboseInfo(Uri uri, int begin, int end, String message, kind) {
29 if (kind.name == 'verbose info') { 29 if (kind.name == 'verbose info') {
30 print(message); 30 print(message);
31 return; 31 return;
32 } 32 }
33 if (message.contains('methods retained for use by dart:mirrors out of')) { 33 if (message.contains('methods retained for use by dart:mirrors out of')) {
34 print(message); 34 print(message);
35 return; 35 return;
36 } 36 }
37 if (kind.name == 'info') return; 37 if (kind.name == 'info') return;
38
39 // TODO(aprelev@gmail.com): Remove once dartbug.com/13907 is fixed.
40 if (message.contains("Warning: 'typedef' not allowed here")) return;
41
38 throw '$uri:$begin:$end: $kind: $message'; 42 throw '$uri:$begin:$end: $kind: $message';
39 } 43 }
40 44
41 void main() { 45 void main() {
42 Compiler compiler = compilerFor( 46 Compiler compiler = compilerFor(
43 MEMORY_SOURCE_FILES, diagnosticHandler: expectOnlyVerboseInfo); 47 MEMORY_SOURCE_FILES, diagnosticHandler: expectOnlyVerboseInfo);
44 asyncTest(() => compiler.runCompiler(Uri.parse('memory:main.dart')).then((_) { 48 asyncTest(() => compiler.runCompiler(Uri.parse('memory:main.dart')).then((_) {
45 print(''); 49 print('');
46 List generatedCode = 50 List generatedCode =
47 Elements.sortedByPosition(compiler.enqueuer.codegen.generatedCode.keys); 51 Elements.sortedByPosition(compiler.enqueuer.codegen.generatedCode.keys);
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 library lib; 147 library lib;
144 148
145 import 'dart:mirrors'; 149 import 'dart:mirrors';
146 150
147 useReflect(type) { 151 useReflect(type) {
148 print(new Symbol('Foo')); 152 print(new Symbol('Foo'));
149 print(MirrorSystem.getName(reflectClass(type).owner.qualifiedName)); 153 print(MirrorSystem.getName(reflectClass(type).owner.qualifiedName));
150 } 154 }
151 """, 155 """,
152 }; 156 };
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/analyze_dart2js_test.dart ('k') | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698