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

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

Issue 10780030: Dartdoc and apidoc updated to use Path. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments Created 8 years, 5 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 | « lib/dartdoc/utils.dart ('k') | tools/create_sdk.py » ('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("../../../lib/dartdoc/mirrors/mirrors.dart"); 5 #import("../../../lib/dartdoc/mirrors/mirrors.dart");
6 #import("../../../lib/dartdoc/mirrors/mirrors_util.dart"); 6 #import("../../../lib/dartdoc/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 11 matching lines...) Expand all
22 } 22 }
23 } 23 }
24 return false; 24 return false;
25 } 25 }
26 26
27 main() { 27 main() {
28 var scriptPath = new Path.fromNative(new Options().script); 28 var scriptPath = new Path.fromNative(new Options().script);
29 var dirPath = scriptPath.directoryPath; 29 var dirPath = scriptPath.directoryPath;
30 var libPath = dirPath.join(new Path.fromNative('../../../')); 30 var libPath = dirPath.join(new Path.fromNative('../../../'));
31 var inputPath = dirPath.join(new Path.fromNative('mirrors_helper.dart')); 31 var inputPath = dirPath.join(new Path.fromNative('mirrors_helper.dart'));
32 var compilation = new Compilation(inputPath.toNativePath(), 32 var compilation = new Compilation(inputPath, libPath);
33 libPath.toNativePath());
34 Expect.isNotNull(compilation, "No compilation created"); 33 Expect.isNotNull(compilation, "No compilation created");
35 34
36 var mirrors = compilation.mirrors(); 35 var mirrors = compilation.mirrors();
37 Expect.isNotNull(mirrors, "No mirror system returned from compilation"); 36 Expect.isNotNull(mirrors, "No mirror system returned from compilation");
38 37
39 var libraries = mirrors.libraries(); 38 var libraries = mirrors.libraries();
40 Expect.isNotNull(libraries, "No libraries map returned"); 39 Expect.isNotNull(libraries, "No libraries map returned");
41 Expect.isFalse(libraries.isEmpty(), "Empty libraries map returned"); 40 Expect.isFalse(libraries.isEmpty(), "Empty libraries map returned");
42 41
43 var helperLibrary = findMirror(libraries, "mirrors_helper"); 42 var helperLibrary = findMirror(libraries, "mirrors_helper");
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 Expect.stringEquals('negate', operator_negate.operatorName, 613 Expect.stringEquals('negate', operator_negate.operatorName,
615 "Unexpected operatorName"); 614 "Unexpected operatorName");
616 615
617 616
618 var bazClassConstructors = bazClass.constructors(); 617 var bazClassConstructors = bazClass.constructors();
619 Expect.isNotNull(bazClassConstructors, "Constructors map is null"); 618 Expect.isNotNull(bazClassConstructors, "Constructors map is null");
620 Expect.equals(3, bazClassConstructors.length, 619 Expect.equals(3, bazClassConstructors.length,
621 "Unexpected number of constructors"); 620 "Unexpected number of constructors");
622 // TODO(johnniwinther): Add tests of constructors. 621 // TODO(johnniwinther): Add tests of constructors.
623 } 622 }
OLDNEW
« no previous file with comments | « lib/dartdoc/utils.dart ('k') | tools/create_sdk.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698