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

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

Issue 11878015: Default constructor for dart:io Path now handles native Windows paths. Path() now does the same as… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Don't change tools/version.dart until the binaries are updated. Created 7 years, 11 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 | « sdk/lib/io/path_impl.dart ('k') | tests/standalone/io/directory_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) 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 '../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart' ; 5 import '../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart' ;
6 import '../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util. dart'; 6 import '../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util. dart';
7 7
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 int count(Iterable iterable) { 10 int count(Iterable iterable) {
(...skipping 16 matching lines...) Expand all
27 DeclarationMirror findMirror(List<DeclarationMirror> list, String name) { 27 DeclarationMirror findMirror(List<DeclarationMirror> list, String name) {
28 for (DeclarationMirror mirror in list) { 28 for (DeclarationMirror mirror in list) {
29 if (mirror.simpleName == name) { 29 if (mirror.simpleName == name) {
30 return mirror; 30 return mirror;
31 } 31 }
32 } 32 }
33 return null; 33 return null;
34 } 34 }
35 35
36 main() { 36 main() {
37 var scriptPath = new Path.fromNative(new Options().script); 37 var scriptPath = new Path(new Options().script);
38 var dirPath = scriptPath.directoryPath; 38 var dirPath = scriptPath.directoryPath;
39 var libPath = dirPath.join(new Path.fromNative('../../../sdk/')); 39 var libPath = dirPath.join(new Path('../../../sdk/'));
40 var inputPath = dirPath.join(new Path.fromNative('mirrors_helper.dart')); 40 var inputPath = dirPath.join(new Path('mirrors_helper.dart'));
41 var compilation = new Compilation.library([inputPath], libPath, null, 41 var compilation = new Compilation.library([inputPath], libPath, null,
42 <String>['--preserve-comments']); 42 <String>['--preserve-comments']);
43 Expect.isNotNull(compilation, "No compilation created"); 43 Expect.isNotNull(compilation, "No compilation created");
44 44
45 var mirrors = compilation.mirrors; 45 var mirrors = compilation.mirrors;
46 Expect.isNotNull(mirrors, "No mirror system returned from compilation"); 46 Expect.isNotNull(mirrors, "No mirror system returned from compilation");
47 47
48 var libraries = mirrors.libraries; 48 var libraries = mirrors.libraries;
49 Expect.isNotNull(libraries, "No libraries map returned"); 49 Expect.isNotNull(libraries, "No libraries map returned");
50 Expect.isFalse(libraries.isEmpty, "Empty libraries map returned"); 50 Expect.isFalse(libraries.isEmpty, "Empty libraries map returned");
(...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 Expect.isTrue(privateFactoryConstructor.isPrivate); 1042 Expect.isTrue(privateFactoryConstructor.isPrivate);
1043 Expect.isFalse(privateFactoryConstructor.isConstConstructor); 1043 Expect.isFalse(privateFactoryConstructor.isConstConstructor);
1044 Expect.isFalse(privateFactoryConstructor.isRedirectingConstructor); 1044 Expect.isFalse(privateFactoryConstructor.isRedirectingConstructor);
1045 Expect.isFalse(privateFactoryConstructor.isGenerativeConstructor); 1045 Expect.isFalse(privateFactoryConstructor.isGenerativeConstructor);
1046 Expect.isTrue(privateFactoryConstructor.isFactoryConstructor); 1046 Expect.isTrue(privateFactoryConstructor.isFactoryConstructor);
1047 1047
1048 var metadata = privateClass.metadata; 1048 var metadata = privateClass.metadata;
1049 Expect.isNotNull(metadata); 1049 Expect.isNotNull(metadata);
1050 Expect.equals(0, metadata.length); 1050 Expect.equals(0, metadata.length);
1051 } 1051 }
OLDNEW
« no previous file with comments | « sdk/lib/io/path_impl.dart ('k') | tests/standalone/io/directory_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698