OLD | NEW |
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 "dart:async"; | 5 import "dart:async"; |
6 import "dart:io"; | 6 import "dart:io"; |
7 | 7 |
8 import "package:expect/expect.dart"; | 8 import "package:expect/expect.dart"; |
9 import "package:async_helper/async_helper.dart"; | 9 import "package:async_helper/async_helper.dart"; |
10 | 10 |
11 import 'package:compiler/compiler.dart' as compiler; | 11 import 'package:compiler/compiler.dart' as compiler; |
12 import 'package:compiler/src/filenames.dart'; | 12 import 'package:compiler/implementation/filenames.dart'; |
13 | 13 |
14 const SOURCES = const { | 14 const SOURCES = const { |
15 "/main.dart": """ | 15 "/main.dart": """ |
16 import "foo.dart"; | 16 import "foo.dart"; |
17 main() => foo(); | 17 main() => foo(); |
18 """, | 18 """, |
19 "/foo.dart": """ | 19 "/foo.dart": """ |
20 library foo; | 20 library foo; |
21 import "bar.dart"; | 21 import "bar.dart"; |
22 foo() => bar(); | 22 foo() => bar(); |
(...skipping 29 matching lines...) Expand all Loading... |
52 })); | 52 })); |
53 } | 53 } |
54 | 54 |
55 void handleDiagnostic(Uri uri, int begin, int end, String message, | 55 void handleDiagnostic(Uri uri, int begin, int end, String message, |
56 compiler.Diagnostic kind) { | 56 compiler.Diagnostic kind) { |
57 print(message); | 57 print(message); |
58 if (kind != compiler.Diagnostic.VERBOSE_INFO) { | 58 if (kind != compiler.Diagnostic.VERBOSE_INFO) { |
59 throw 'Unexpected diagnostic kind $kind'; | 59 throw 'Unexpected diagnostic kind $kind'; |
60 } | 60 } |
61 } | 61 } |
OLD | NEW |