| Index: compiler/javatests/com/google/dart/compiler/end2end/inc/IncrementalCompilation2Test.java
|
| diff --git a/compiler/javatests/com/google/dart/compiler/end2end/inc/IncrementalCompilation2Test.java b/compiler/javatests/com/google/dart/compiler/end2end/inc/IncrementalCompilation2Test.java
|
| index 454e97a4bd3032b0cfe5f7349f2b3a2d08191167..05c68c0d7f97fe6fb637a67663f2c5a085ed124c 100644
|
| --- a/compiler/javatests/com/google/dart/compiler/end2end/inc/IncrementalCompilation2Test.java
|
| +++ b/compiler/javatests/com/google/dart/compiler/end2end/inc/IncrementalCompilation2Test.java
|
| @@ -1,16 +1,14 @@
|
| -// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
|
| +// Copyright (c) 2012, 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.
|
| package com.google.dart.compiler.end2end.inc;
|
|
|
| import static com.google.dart.compiler.DartCompiler.EXTENSION_DEPS;
|
| -import static com.google.dart.compiler.backend.js.AbstractJsBackend.EXTENSION_APP_JS;
|
| -import static com.google.dart.compiler.backend.js.AbstractJsBackend.EXTENSION_JS;
|
| +import static com.google.dart.compiler.DartCompiler.EXTENSION_TIMESTAMP;
|
| import static com.google.dart.compiler.common.ErrorExpectation.assertErrors;
|
| import static com.google.dart.compiler.common.ErrorExpectation.errEx;
|
|
|
| import com.google.common.collect.Lists;
|
| -import com.google.dart.compiler.CommandLineOptions.CompilerOptions;
|
| import com.google.dart.compiler.CompilerTestCase;
|
| import com.google.dart.compiler.DartCompilationError;
|
| import com.google.dart.compiler.DartCompiler;
|
| @@ -77,14 +75,7 @@ public class IncrementalCompilation2Test extends CompilerTestCase {
|
|
|
| @Override
|
| protected void setUp() throws Exception {
|
| - CompilerOptions compilerOptions = new CompilerOptions() {
|
| - // TODO(zundel): Update these tests to run without requiring code generation
|
| - @Override
|
| - public boolean checkOnly() {
|
| - return false;
|
| - }
|
| - };
|
| - config = new DefaultCompilerConfiguration(new JavascriptBackend(), compilerOptions) {
|
| + config = new DefaultCompilerConfiguration(new JavascriptBackend()) {
|
| @Override
|
| public boolean incremental() {
|
| return true;
|
| @@ -151,9 +142,9 @@ public class IncrementalCompilation2Test extends CompilerTestCase {
|
| //assertErrors(errors, errEx(ResolverErrorCode.DUPLICATE_LOCAL_VARIABLE_WARNING, -1, 7, 20));
|
| // B should be compiled because it now conflicts with A.
|
| // C should not be compiled, because it reference "not_hole" field, not top-level variable.
|
| - didWrite("A.dart", EXTENSION_JS);
|
| - didWrite("B.dart", EXTENSION_JS);
|
| - didNotWrite("C.dart", EXTENSION_JS);
|
| + didWrite("A.dart", EXTENSION_TIMESTAMP);
|
| + didWrite("B.dart", EXTENSION_TIMESTAMP);
|
| + didNotWrite("C.dart", EXTENSION_TIMESTAMP);
|
| assertAppBuilt();
|
| }
|
|
|
| @@ -183,8 +174,8 @@ public class IncrementalCompilation2Test extends CompilerTestCase {
|
| ""));
|
| compile();
|
| // A and B should be compiled.
|
| - didWrite("A.dart", EXTENSION_JS);
|
| - didWrite("B.dart", EXTENSION_JS);
|
| + didWrite("A.dart", EXTENSION_TIMESTAMP);
|
| + didWrite("B.dart", EXTENSION_TIMESTAMP);
|
| assertAppBuilt();
|
| // "hole" was filled with top-level field.
|
| assertErrors(errors);
|
| @@ -226,9 +217,9 @@ public class IncrementalCompilation2Test extends CompilerTestCase {
|
| compile();
|
| // B should be compiled because it also declares foo(), so produces "shadow" conflict.
|
| // C should be compiled because it has unqualified invocation which was declared in A.
|
| - didWrite("A.dart", EXTENSION_JS);
|
| - didWrite("B.dart", EXTENSION_JS);
|
| - didWrite("C.dart", EXTENSION_JS);
|
| + didWrite("A.dart", EXTENSION_TIMESTAMP);
|
| + didWrite("B.dart", EXTENSION_TIMESTAMP);
|
| + didWrite("C.dart", EXTENSION_TIMESTAMP);
|
| assertAppBuilt();
|
| }
|
| // Remove top-level foo(), so invocation of foo() in B should be bound to the super class.
|
| @@ -237,9 +228,9 @@ public class IncrementalCompilation2Test extends CompilerTestCase {
|
| compile();
|
| // B should be compiled because it also declares foo(), so produces "shadow" conflict.
|
| // C should be compiled because it has unqualified invocation which was declared in A.
|
| - didWrite("A.dart", EXTENSION_JS);
|
| - didWrite("B.dart", EXTENSION_JS);
|
| - didWrite("C.dart", EXTENSION_JS);
|
| + didWrite("A.dart", EXTENSION_TIMESTAMP);
|
| + didWrite("B.dart", EXTENSION_TIMESTAMP);
|
| + didWrite("C.dart", EXTENSION_TIMESTAMP);
|
| }
|
| }
|
|
|
| @@ -279,9 +270,9 @@ public class IncrementalCompilation2Test extends CompilerTestCase {
|
| compile();
|
| // B should be compiled because it also declares foo(), so produces "shadow" conflict.
|
| // C should not be compiled because.
|
| - didWrite("A.dart", EXTENSION_JS);
|
| - didWrite("B.dart", EXTENSION_JS);
|
| - didNotWrite("C.dart", EXTENSION_JS);
|
| + didWrite("A.dart", EXTENSION_TIMESTAMP);
|
| + didWrite("B.dart", EXTENSION_TIMESTAMP);
|
| + didNotWrite("C.dart", EXTENSION_TIMESTAMP);
|
| assertAppBuilt();
|
| }
|
| }
|
| @@ -322,9 +313,9 @@ public class IncrementalCompilation2Test extends CompilerTestCase {
|
| compile();
|
| // B should be compiled because it also declares "foo", so produces "shadow" conflict.
|
| // C should be compiled because it has unqualified invocation which was declared in A.
|
| - didWrite("A.dart", EXTENSION_JS);
|
| - didWrite("B.dart", EXTENSION_JS);
|
| - didWrite("C.dart", EXTENSION_JS);
|
| + didWrite("A.dart", EXTENSION_TIMESTAMP);
|
| + didWrite("B.dart", EXTENSION_TIMESTAMP);
|
| + didWrite("C.dart", EXTENSION_TIMESTAMP);
|
| assertAppBuilt();
|
| }
|
| // Remove top-level "foo", so access to "foo" in B should be bound to the super class.
|
| @@ -333,9 +324,9 @@ public class IncrementalCompilation2Test extends CompilerTestCase {
|
| compile();
|
| // B should be compiled because it also declares "foo", so produces "shadow" conflict.
|
| // C should be compiled because it has unqualified access which was declared in A.
|
| - didWrite("A.dart", EXTENSION_JS);
|
| - didWrite("B.dart", EXTENSION_JS);
|
| - didWrite("C.dart", EXTENSION_JS);
|
| + didWrite("A.dart", EXTENSION_TIMESTAMP);
|
| + didWrite("B.dart", EXTENSION_TIMESTAMP);
|
| + didWrite("C.dart", EXTENSION_TIMESTAMP);
|
| }
|
| }
|
|
|
| @@ -375,9 +366,9 @@ public class IncrementalCompilation2Test extends CompilerTestCase {
|
| compile();
|
| // B should be compiled because it also declares "foo", so produces "shadow" conflict.
|
| // C should not be compiled because it has qualified access to "foo".
|
| - didWrite("A.dart", EXTENSION_JS);
|
| - didWrite("B.dart", EXTENSION_JS);
|
| - didNotWrite("C.dart", EXTENSION_JS);
|
| + didWrite("A.dart", EXTENSION_TIMESTAMP);
|
| + didWrite("B.dart", EXTENSION_TIMESTAMP);
|
| + didNotWrite("C.dart", EXTENSION_TIMESTAMP);
|
| assertAppBuilt();
|
| }
|
| }
|
| @@ -401,7 +392,7 @@ public class IncrementalCompilation2Test extends CompilerTestCase {
|
| compile();
|
| // Now there is top-level declarations conflict between A and B.
|
| // So, B should be compiled.
|
| - didWrite("B.dart", EXTENSION_JS);
|
| + didWrite("B.dart", EXTENSION_TIMESTAMP);
|
| // But application should be build.
|
| assertAppBuilt();
|
| // Because B was compiled, it has warning.
|
| @@ -429,7 +420,7 @@ public class IncrementalCompilation2Test extends CompilerTestCase {
|
| // Top-level declaration in A was removed, so no conflict.
|
| // So:
|
| // ... B should be recompiled.
|
| - didWrite("B.dart", EXTENSION_JS);
|
| + didWrite("B.dart", EXTENSION_TIMESTAMP);
|
| // ... but application should be rebuild.
|
| assertAppBuilt();
|
| // Because B was recompiled, it has no warning.
|
| @@ -466,10 +457,9 @@ public class IncrementalCompilation2Test extends CompilerTestCase {
|
| // Now there is top-level declarations conflict between A and B.
|
| // So:
|
| // ... B should be recompiled.
|
| - didWrite("B.dart", EXTENSION_JS);
|
| + didWrite("B.dart", EXTENSION_TIMESTAMP);
|
| // ... but application should be rebuild.
|
| didWrite(APP, EXTENSION_DEPS);
|
| - didWrite(APP, EXTENSION_APP_JS);
|
| // Because B was recompiled, it has no warning.
|
| assertErrors(errors);
|
| }
|
| @@ -505,7 +495,7 @@ public class IncrementalCompilation2Test extends CompilerTestCase {
|
| ""));
|
| compile();
|
| // B depends on A class, so compiled.
|
| - didWrite("B.dart", EXTENSION_JS);
|
| + didWrite("B.dart", EXTENSION_TIMESTAMP);
|
| assertAppBuilt();
|
| // Because B was compiled, it has warning.
|
| assertErrors(errors, errEx(ResolverErrorCode.DUPLICATE_LOCAL_VARIABLE_WARNING, 4, 9, 3));
|
| @@ -576,7 +566,6 @@ public class IncrementalCompilation2Test extends CompilerTestCase {
|
|
|
| private void assertAppBuilt() {
|
| didWrite(APP, EXTENSION_DEPS);
|
| - didWrite(APP, EXTENSION_APP_JS);
|
| }
|
|
|
| private void compile() {
|
|
|