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

Side by Side Diff: dart/tests/utils/dummy_compiler_test.dart

Issue 10407092: Add --package-root option to the compiler. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 7 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 // Smoke test of the dart2js compiler API. 5 // Smoke test of the dart2js compiler API.
6 6
7 #import('../../lib/compiler/compiler.dart'); 7 #import('../../lib/compiler/compiler.dart');
8 #import('dart:uri'); 8 #import('dart:uri');
9 9
10 Future<String> provider(Uri uri) { 10 Future<String> provider(Uri uri) {
(...skipping 27 matching lines...) Expand all
38 } 38 }
39 completer.complete(source); 39 completer.complete(source);
40 return completer.future; 40 return completer.future;
41 } 41 }
42 42
43 void handler(Uri uri, int begin, int end, String message, bool fatal) { 43 void handler(Uri uri, int begin, int end, String message, bool fatal) {
44 print(message); 44 print(message);
45 } 45 }
46 46
47 main() { 47 main() {
48 String code = compile(new Uri(scheme: 'main'), new Uri(scheme: 'lib'), 48 String code = compile(new Uri(scheme: 'main'),
49 new Uri(scheme: 'lib'),
50 new Uri(scheme: 'package'),
49 provider, handler).value; 51 provider, handler).value;
50 if (code === null) { 52 if (code === null) {
51 throw 'Compilation failed'; 53 throw 'Compilation failed';
52 } 54 }
53 } 55 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698