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

Unified Diff: compiler/javatests/com/google/dart/compiler/end2end/End2EndTestCase.java

Issue 9346021: Turn off code generation in dartc by default, soon to be static analysis only (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Feedback from scheglov Created 8 years, 10 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
Index: compiler/javatests/com/google/dart/compiler/end2end/End2EndTestCase.java
diff --git a/compiler/javatests/com/google/dart/compiler/end2end/End2EndTestCase.java b/compiler/javatests/com/google/dart/compiler/end2end/End2EndTestCase.java
index a6efac3579fbe2ffd26406cbf17b4df990ad21aa..9b4a7ced253f4c566b3a9aca199698c1ac46c2a6 100644
--- a/compiler/javatests/com/google/dart/compiler/end2end/End2EndTestCase.java
+++ b/compiler/javatests/com/google/dart/compiler/end2end/End2EndTestCase.java
@@ -29,6 +29,9 @@ import java.util.List;
/**
* Abstract base for end-to-end tests. Tests are entirely Dart code that are compiled and run
* within Rhino or V8.
+ *
+ * TODO(zundel): code generation is being removed. Remove any references to code generation
+ * or running code.
*/
public abstract class End2EndTestCase extends CompilerTestCase {
@@ -59,9 +62,23 @@ public abstract class End2EndTestCase extends CompilerTestCase {
CompilerConfiguration getCompilerConfiguration(OptimizationLevel opLevel) {
switch (opLevel) {
case RAW:
- return new DefaultCompilerConfiguration(new JavascriptBackend());
+ return new DefaultCompilerConfiguration(new JavascriptBackend(),
+ new CompilerOptions() {
+ // TODO(zundel): To be removed when code generation is removed
+ @Override
+ public boolean checkOnly() {
+ return false;
+ }
+ });
case APP:
- return new DefaultCompilerConfiguration(new ClosureJsBackend());
+ return new DefaultCompilerConfiguration(new ClosureJsBackend(),
+ new CompilerOptions() {
+ // TODO(zundel): To be removed when code generation is removed
+ @Override
+ public boolean checkOnly() {
+ return false;
+ }
+ });
}
throw new IllegalStateException("unexpected opLevel");
}
@@ -69,11 +86,13 @@ public abstract class End2EndTestCase extends CompilerTestCase {
/**
* Runs an end-to-end Dart test for the given compilation unit.
*/
+ @Deprecated
protected void runTest(LibrarySource app, OptimizationLevel opLevel,
DartCompilerListener listener) {
runTest(app, opLevel, listener, new String[0]);
}
+ @Deprecated
protected void runTest(LibrarySource app, OptimizationLevel opLevel,
DartCompilerListener listener, String[] args) {
final CompilerConfiguration config = getCompilerConfiguration(opLevel);
@@ -81,12 +100,19 @@ public abstract class End2EndTestCase extends CompilerTestCase {
}
/**
- * Runs an end-to-end Dart test for the given compilation unit.
+ * Compiles and runs an end-to-end Dart test for the given compilation unit.
+ *
*/
+ @Deprecated
protected void runTest(LibrarySource app, OptimizationLevel opLevel,
DartCompilerListener listener,
CompilerConfiguration config, String[] args) {
- DartRunnerOptions verboseOptions = new CommandLineOptions.DartRunnerOptions();
+ DartRunnerOptions verboseOptions = new CommandLineOptions.DartRunnerOptions() {
+ @Override
+ public boolean checkOnly() {
+ return false;
+ }
+ };
verboseOptions.setVerbose(true);
try {
DartRunner.compileAndRunApp(app, verboseOptions, config, listener, args,

Powered by Google App Engine
This is Rietveld 408576698