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 05c68c0d7f97fe6fb637a67663f2c5a085ed124c..692daf7ff276a56086a4cd516bb62e9864f783bf 100644 |
--- a/compiler/javatests/com/google/dart/compiler/end2end/inc/IncrementalCompilation2Test.java |
+++ b/compiler/javatests/com/google/dart/compiler/end2end/inc/IncrementalCompilation2Test.java |
@@ -20,7 +20,6 @@ import com.google.dart.compiler.LibrarySource; |
import com.google.dart.compiler.MockArtifactProvider; |
import com.google.dart.compiler.Source; |
import com.google.dart.compiler.ast.DartUnit; |
-import com.google.dart.compiler.backend.js.JavascriptBackend; |
import com.google.dart.compiler.resolver.ResolverErrorCode; |
import com.google.dart.compiler.resolver.TypeErrorCode; |
@@ -75,7 +74,7 @@ public class IncrementalCompilation2Test extends CompilerTestCase { |
@Override |
protected void setUp() throws Exception { |
- config = new DefaultCompilerConfiguration(new JavascriptBackend()) { |
+ config = new DefaultCompilerConfiguration() { |
@Override |
public boolean incremental() { |
return true; |
@@ -185,7 +184,7 @@ public class IncrementalCompilation2Test extends CompilerTestCase { |
* Test for "hole" feature. If we use unqualified invocation and add/remove top-level method, this |
* should cause compilation of invocation unit. |
*/ |
- public void test_isMethodHole_useUnqualifiedInvocation() { |
+ public void test_isMethodHole_useUnqualifiedInvocation() throws Exception { |
appSource.setContent( |
"B.dart", |
makeCode( |
@@ -222,6 +221,8 @@ public class IncrementalCompilation2Test extends CompilerTestCase { |
didWrite("C.dart", EXTENSION_TIMESTAMP); |
assertAppBuilt(); |
} |
+ // Wait, because analysis is so fast that may be A will have same time as old artifact. |
+ Thread.sleep(5); |
// Remove top-level foo(), so invocation of foo() in B should be bound to the super class. |
{ |
appSource.setContent("A.dart", ""); |
@@ -281,7 +282,7 @@ public class IncrementalCompilation2Test extends CompilerTestCase { |
* Test for "hole" feature. If we use unqualified access and add/remove top-level field, this |
* should cause compilation of invocation unit. |
*/ |
- public void test_fieldHole_useUnqualifiedAccess() { |
+ public void test_fieldHole_useUnqualifiedAccess() throws Exception { |
appSource.setContent( |
"B.dart", |
makeCode( |
@@ -318,6 +319,8 @@ public class IncrementalCompilation2Test extends CompilerTestCase { |
didWrite("C.dart", EXTENSION_TIMESTAMP); |
assertAppBuilt(); |
} |
+ // Wait, because analysis is so fast that may be A will have same time as old artifact. |
+ Thread.sleep(5); |
// Remove top-level "foo", so access to "foo" in B should be bound to the super class. |
{ |
appSource.setContent("A.dart", ""); |