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

Unified Diff: tests/compiler/dart2js/compile_with_empty_libraries_test.dart

Issue 1320913002: dart2js: Add test to compile empty main without any libraries. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/compiler/dart2js/dart2js.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
+}
« no previous file with comments | « no previous file | tests/compiler/dart2js/dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698