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

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

Issue 17406010: Move getters from Options to Platform (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed Dart_GetType Created 7 years, 6 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 import "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 import '../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart' ; 6 import '../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart' ;
7 import '../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util. dart'; 7 import '../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util. dart';
8 import '../../../sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirro r.dart'; 8 import '../../../sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirro r.dart';
9 import '../../../sdk/lib/_internal/compiler/implementation/filenames.dart' 9 import '../../../sdk/lib/_internal/compiler/implementation/filenames.dart'
10 show currentDirectory, nativeToUriPath; 10 show currentDirectory, nativeToUriPath;
(...skipping 24 matching lines...) Expand all
35 for (DeclarationMirror mirror in list) { 35 for (DeclarationMirror mirror in list) {
36 if (mirror.simpleName == name) { 36 if (mirror.simpleName == name) {
37 return mirror; 37 return mirror;
38 } 38 }
39 } 39 }
40 return null; 40 return null;
41 } 41 }
42 42
43 main() { 43 main() {
44 Uri scriptUri = 44 Uri scriptUri =
45 currentDirectory.resolve(nativeToUriPath(new Options().script)); 45 currentDirectory.resolve(nativeToUriPath(Platform.script));
46 Uri libUri = scriptUri.resolve('../../../sdk/'); 46 Uri libUri = scriptUri.resolve('../../../sdk/');
47 Uri inputUri = scriptUri.resolve('mirrors_helper.dart'); 47 Uri inputUri = scriptUri.resolve('mirrors_helper.dart');
48 var provider = new SourceFileProvider(); 48 var provider = new SourceFileProvider();
49 var diagnosticHandler = 49 var diagnosticHandler =
50 new FormattingDiagnosticHandler(provider).diagnosticHandler; 50 new FormattingDiagnosticHandler(provider).diagnosticHandler;
51 var result = analyze([inputUri], libUri, null, 51 var result = analyze([inputUri], libUri, null,
52 provider.readStringFromUri, diagnosticHandler, 52 provider.readStringFromUri, diagnosticHandler,
53 <String>['--preserve-comments']); 53 <String>['--preserve-comments']);
54 result.then((MirrorSystem mirrors) { 54 result.then((MirrorSystem mirrors) {
55 test(mirrors); 55 test(mirrors);
(...skipping 976 matching lines...) Expand 10 before | Expand all | Expand 10 after
1032 Expect.isTrue(privateFactoryConstructor.isPrivate); 1032 Expect.isTrue(privateFactoryConstructor.isPrivate);
1033 Expect.isFalse(privateFactoryConstructor.isConstConstructor); 1033 Expect.isFalse(privateFactoryConstructor.isConstConstructor);
1034 Expect.isFalse(privateFactoryConstructor.isRedirectingConstructor); 1034 Expect.isFalse(privateFactoryConstructor.isRedirectingConstructor);
1035 Expect.isFalse(privateFactoryConstructor.isGenerativeConstructor); 1035 Expect.isFalse(privateFactoryConstructor.isGenerativeConstructor);
1036 Expect.isTrue(privateFactoryConstructor.isFactoryConstructor); 1036 Expect.isTrue(privateFactoryConstructor.isFactoryConstructor);
1037 1037
1038 var metadata = privateClass.metadata; 1038 var metadata = privateClass.metadata;
1039 Expect.isNotNull(metadata); 1039 Expect.isNotNull(metadata);
1040 Expect.equals(0, metadata.length); 1040 Expect.equals(0, metadata.length);
1041 } 1041 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/mirror_tree_shaking_test.dart ('k') | tests/compiler/dart2js/unneeded_part_js_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698