Index: tests/compiler/dart2js/compile_with_empty_libraries_test.dart |
diff --git a/tests/compiler/dart2js/compile_with_empty_libraries_test.dart b/tests/compiler/dart2js/compile_with_empty_libraries_test.dart |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b133d85a7af56d0bc0630fe51917172c5a1a2d64 |
--- /dev/null |
+++ b/tests/compiler/dart2js/compile_with_empty_libraries_test.dart |
@@ -0,0 +1,18 @@ |
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
+/// Test that the dart2js compiler can compile an empty script without |
+/// references to core library definitions. |
+ |
+import 'package:async_helper/async_helper.dart'; |
+import 'mock_compiler.dart'; |
+ |
+const String TEST = r"main() {}"; |
+ |
+main() { |
+ Uri uri = new Uri(scheme: 'source'); |
+ MockCompiler compiler = |
+ new MockCompiler.internal(librariesOverride: (_) => ''); |
+ asyncTest(() => compiler.runCompiler(uri)); |
+} |