summaryrefslogtreecommitdiffstats
path: root/jack-tests/tests/com/android/jack
diff options
context:
space:
mode:
authorJean-Marie Henaff <jmhenaff@google.com>2014-12-11 10:29:03 +0100
committerJean-Marie Henaff <jmhenaff@google.com>2014-12-11 10:32:11 +0100
commit9d8f8efea66cfe7547eef672f14eca971f646b96 (patch)
tree43f1150a1cea1ec88b6be34c0536506c171523f0 /jack-tests/tests/com/android/jack
parent24e2642d8c3adddac9dc4df542f7c098d477ab79 (diff)
downloadtoolchain_jack-9d8f8efea66cfe7547eef672f14eca971f646b96.zip
toolchain_jack-9d8f8efea66cfe7547eef672f14eca971f646b96.tar.gz
toolchain_jack-9d8f8efea66cfe7547eef672f14eca971f646b96.tar.bz2
Remove references to TestTools in jack-tests
Remove references on TestTools that can be handled by AbstractTestTools Change-Id: I3d004df0c6950dee4b3715cd6c88f809efd55b0b
Diffstat (limited to 'jack-tests/tests/com/android/jack')
-rw-r--r--jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest001.java27
-rw-r--r--jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest002.java4
-rw-r--r--jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest003.java4
-rw-r--r--jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest004.java4
-rw-r--r--jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest005.java10
-rw-r--r--jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest006.java4
-rw-r--r--jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest007.java4
-rw-r--r--jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest008.java8
-rw-r--r--jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest009.java4
-rw-r--r--jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest010.java6
-rw-r--r--jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest011.java4
-rw-r--r--jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest012.java4
-rw-r--r--jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest013.java8
-rw-r--r--jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest014.java6
-rw-r--r--jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest015.java10
-rw-r--r--jack-tests/tests/com/android/jack/fibonacci/FibonacciTests.java1
-rw-r--r--jack-tests/tests/com/android/jack/field/FieldTests.java1
-rw-r--r--jack-tests/tests/com/android/jack/fileconflict/FileConflictTests.java4
-rw-r--r--jack-tests/tests/com/android/jack/inner/InnerTests.java1
-rw-r--r--jack-tests/tests/com/android/jack/java7/BoxingTest.java7
-rw-r--r--jack-tests/tests/com/android/jack/multidex/MultiDexOverflowTests.java9
-rw-r--r--jack-tests/tests/com/android/jack/shrob/AbstractTest.java6
-rw-r--r--jack-tests/tests/com/android/jack/shrob/AnnotationsTest.java6
-rw-r--r--jack-tests/tests/com/android/jack/tools/merger/MergerTestTools.java8
-rw-r--r--jack-tests/tests/com/android/jack/tools/merger/test011/MergerTest011.java18
-rw-r--r--jack-tests/tests/com/android/jack/trycatch/TrycatchTests.java1
26 files changed, 76 insertions, 93 deletions
diff --git a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest001.java b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest001.java
index 3a0a93b..9ba51ae 100644
--- a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest001.java
+++ b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest001.java
@@ -17,7 +17,6 @@
package com.android.jack.experimental.incremental;
import com.android.jack.Main;
-import com.android.jack.TestTools;
import com.android.jack.frontend.FrontendCompilationException;
import com.android.jack.test.helper.IncrementalTestHelper;
import com.android.jack.test.toolchain.AbstractTestTools;
@@ -77,7 +76,7 @@ public class DependenciesTest001 {
@Test
public void testDependency002() throws Exception {
IncrementalTestHelper ite =
- new IncrementalTestHelper(TestTools.createTempDir("DependenciesTest_", "_002"));
+ new IncrementalTestHelper(AbstractTestTools.createTempDir());
ite.addJavaFile("jack.incremental", "A.java",
"package jack.incremental; \n"+
@@ -135,7 +134,7 @@ public class DependenciesTest001 {
@Test
public void testDependency004() throws Exception {
IncrementalTestHelper ite =
- new IncrementalTestHelper(TestTools.createTempDir("DependenciesTest_", "_004"));
+ new IncrementalTestHelper(AbstractTestTools.createTempDir());
ite.addJavaFile("jack.incremental", "A.java",
"package jack.incremental; \n"+
@@ -161,7 +160,7 @@ public class DependenciesTest001 {
@Test
public void testDependency005() throws Exception {
IncrementalTestHelper ite =
- new IncrementalTestHelper(TestTools.createTempDir("DependenciesTest_", "_005"));
+ new IncrementalTestHelper(AbstractTestTools.createTempDir());
ite.addJavaFile("jack.incremental", "A.java",
"package jack.incremental; \n"+
@@ -197,7 +196,7 @@ public class DependenciesTest001 {
@Test
public void testDependency006() throws Exception {
IncrementalTestHelper ite =
- new IncrementalTestHelper(TestTools.createTempDir("DependenciesTest_", "_006"));
+ new IncrementalTestHelper(AbstractTestTools.createTempDir());
ite.addJavaFile("jack.incremental", "A.java",
"package jack.incremental; \n"+
@@ -233,7 +232,7 @@ public class DependenciesTest001 {
@Test
public void testDependency007() throws Exception {
IncrementalTestHelper ite =
- new IncrementalTestHelper(TestTools.createTempDir("DependenciesTest_", "_007"));
+ new IncrementalTestHelper(AbstractTestTools.createTempDir());
ite.addJavaFile("jack.incremental", "A.java",
"package jack.incremental; \n"+
@@ -269,7 +268,7 @@ public class DependenciesTest001 {
@Test
public void testDependency008() throws Exception {
IncrementalTestHelper ite =
- new IncrementalTestHelper(TestTools.createTempDir("DependenciesTest_", "_008"));
+ new IncrementalTestHelper(AbstractTestTools.createTempDir());
ite.addJavaFile("jack.incremental", "A.java",
"package jack.incremental; \n"+
@@ -300,7 +299,7 @@ public class DependenciesTest001 {
@Test
public void testDependency009() throws Exception {
IncrementalTestHelper ite =
- new IncrementalTestHelper(TestTools.createTempDir("DependenciesTest_", "_009"));
+ new IncrementalTestHelper(AbstractTestTools.createTempDir());
ite.addJavaFile("jack.incremental", "A.java",
"package jack.incremental; \n"+
@@ -332,7 +331,7 @@ public class DependenciesTest001 {
@Test
public void testDependency010() throws Exception {
IncrementalTestHelper ite =
- new IncrementalTestHelper(TestTools.createTempDir("DependenciesTest_", "_010"));
+ new IncrementalTestHelper(AbstractTestTools.createTempDir());
ite.addJavaFile("jack.incremental", "A.java",
"package jack.incremental; \n"+
@@ -363,7 +362,7 @@ public class DependenciesTest001 {
@Test
public void testDependency011() throws Exception {
IncrementalTestHelper ite =
- new IncrementalTestHelper(TestTools.createTempDir("DependenciesTest_", "_011"));
+ new IncrementalTestHelper(AbstractTestTools.createTempDir());
ite.addJavaFile("jack.incremental", "A.java",
"package jack.incremental; \n"+
@@ -393,7 +392,7 @@ public class DependenciesTest001 {
@Test
public void testDependency012() throws Exception {
IncrementalTestHelper ite =
- new IncrementalTestHelper(TestTools.createTempDir("DependenciesTest_", "_012"));
+ new IncrementalTestHelper(AbstractTestTools.createTempDir());
ite.addJavaFile("jack.incremental", "A.java",
"package jack.incremental; \n"+
@@ -425,7 +424,7 @@ public class DependenciesTest001 {
@Test
public void testDependency013() throws Exception {
IncrementalTestHelper ite =
- new IncrementalTestHelper(TestTools.createTempDir("DependenciesTest_", "_013"));
+ new IncrementalTestHelper(AbstractTestTools.createTempDir());
ite.addJavaFile("jack.incremental", "A.java",
"package jack.incremental; \n"+
@@ -457,7 +456,7 @@ public class DependenciesTest001 {
@Test
public void testDependency014() throws Exception {
IncrementalTestHelper ite =
- new IncrementalTestHelper(TestTools.createTempDir("DependenciesTest_", "_014"));
+ new IncrementalTestHelper(AbstractTestTools.createTempDir());
ite.addJavaFile("jack.incremental", "A.java",
"package jack.incremental; \n"+
@@ -505,7 +504,7 @@ public class DependenciesTest001 {
@Test
public void testDependency015() throws Exception {
IncrementalTestHelper ite =
- new IncrementalTestHelper(TestTools.createTempDir("DependenciesTest_", "_015"));
+ new IncrementalTestHelper(AbstractTestTools.createTempDir());
ite.addJavaFile("jack.incremental", "A.java",
"package jack.incremental; \n"+
diff --git a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest002.java b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest002.java
index fcded87..0699009 100644
--- a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest002.java
+++ b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest002.java
@@ -17,8 +17,8 @@
package com.android.jack.experimental.incremental;
import com.android.jack.Main;
-import com.android.jack.TestTools;
import com.android.jack.test.helper.IncrementalTestHelper;
+import com.android.jack.test.toolchain.AbstractTestTools;
import junit.framework.Assert;
@@ -43,7 +43,7 @@ public class DependenciesTest002 {
@Test
public void testDependency001() throws Exception {
IncrementalTestHelper ite =
- new IncrementalTestHelper(TestTools.createTempDir("DependenciesTest_", "_001"));
+ new IncrementalTestHelper(AbstractTestTools.createTempDir());
ite.addJavaFile("jack.incremental", "A.java",
"package jack.incremental; \n"+
diff --git a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest003.java b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest003.java
index 457cd49..cfbee6f 100644
--- a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest003.java
+++ b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest003.java
@@ -17,8 +17,8 @@
package com.android.jack.experimental.incremental;
import com.android.jack.Main;
-import com.android.jack.TestTools;
import com.android.jack.test.helper.IncrementalTestHelper;
+import com.android.jack.test.toolchain.AbstractTestTools;
import junit.framework.Assert;
@@ -44,7 +44,7 @@ public class DependenciesTest003 {
@Test
public void testDependency001() throws Exception {
IncrementalTestHelper ite =
- new IncrementalTestHelper(TestTools.createTempDir("DependenciesTest_", "_001"));
+ new IncrementalTestHelper(AbstractTestTools.createTempDir());
ite.addJavaFile("jack.incremental", "A.java",
"package jack.incremental; \n"+
diff --git a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest004.java b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest004.java
index 2d3a962..887f9f2 100644
--- a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest004.java
+++ b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest004.java
@@ -17,8 +17,8 @@
package com.android.jack.experimental.incremental;
import com.android.jack.Main;
-import com.android.jack.TestTools;
import com.android.jack.test.helper.IncrementalTestHelper;
+import com.android.jack.test.toolchain.AbstractTestTools;
import junit.framework.Assert;
@@ -43,7 +43,7 @@ public class DependenciesTest004 {
@Test
public void testDependency001() throws Exception {
IncrementalTestHelper ite =
- new IncrementalTestHelper(TestTools.createTempDir("DependenciesTest_", "_001"));
+ new IncrementalTestHelper(AbstractTestTools.createTempDir());
ite.addJavaFile("jack.incremental", "A.java",
"package jack.incremental; \n"+
diff --git a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest005.java b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest005.java
index fffd2da..42fc69f 100644
--- a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest005.java
+++ b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest005.java
@@ -17,8 +17,8 @@
package com.android.jack.experimental.incremental;
import com.android.jack.Main;
-import com.android.jack.TestTools;
import com.android.jack.test.helper.IncrementalTestHelper;
+import com.android.jack.test.toolchain.AbstractTestTools;
import junit.framework.Assert;
@@ -45,7 +45,7 @@ public class DependenciesTest005 {
@Test
public void testDependency001() throws Exception {
IncrementalTestHelper ite =
- new IncrementalTestHelper(TestTools.createTempDir("DependenciesTest_", "_001"));
+ new IncrementalTestHelper(AbstractTestTools.createTempDir());
ite.addJavaFile("jack.incremental", "A.java",
"package jack.incremental; \n"+
@@ -85,7 +85,7 @@ public class DependenciesTest005 {
@Test
public void testDependency002() throws Exception {
IncrementalTestHelper ite =
- new IncrementalTestHelper(TestTools.createTempDir("DependenciesTest_", "_002"));
+ new IncrementalTestHelper(AbstractTestTools.createTempDir());
ite.addJavaFile("jack.incremental", "A.java",
"package jack.incremental; \n"+
@@ -125,7 +125,7 @@ public class DependenciesTest005 {
@Test
public void testDependency003() throws Exception {
IncrementalTestHelper ite =
- new IncrementalTestHelper(TestTools.createTempDir("DependenciesTest_", "_003"));
+ new IncrementalTestHelper(AbstractTestTools.createTempDir());
ite.addJavaFile("jack.incremental", "A.java",
"package jack.incremental; \n"+
@@ -168,7 +168,7 @@ public class DependenciesTest005 {
@Test
public void testDependency004() throws Exception {
IncrementalTestHelper ite =
- new IncrementalTestHelper(TestTools.createTempDir("DependenciesTest_", "_004"));
+ new IncrementalTestHelper(AbstractTestTools.createTempDir());
ite.addJavaFile("jack.incremental", "A.java",
"package jack.incremental; \n"+
diff --git a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest006.java b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest006.java
index a27b239..567e649 100644
--- a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest006.java
+++ b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest006.java
@@ -17,9 +17,9 @@
package com.android.jack.experimental.incremental;
import com.android.jack.Main;
-import com.android.jack.TestTools;
import com.android.jack.frontend.FrontendCompilationException;
import com.android.jack.test.helper.IncrementalTestHelper;
+import com.android.jack.test.toolchain.AbstractTestTools;
import junit.framework.Assert;
@@ -47,7 +47,7 @@ public class DependenciesTest006 {
@Test
public void testDependency001() throws Exception {
IncrementalTestHelper ite =
- new IncrementalTestHelper(TestTools.createTempDir("DependenciesTest_", "_001"));
+ new IncrementalTestHelper(AbstractTestTools.createTempDir());
ite.addJavaFile("jack.incremental", "A.java",
"package jack.incremental; \n"+
diff --git a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest007.java b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest007.java
index 329a3e3..f2c68c8 100644
--- a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest007.java
+++ b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest007.java
@@ -17,8 +17,8 @@
package com.android.jack.experimental.incremental;
import com.android.jack.Main;
-import com.android.jack.TestTools;
import com.android.jack.test.helper.IncrementalTestHelper;
+import com.android.jack.test.toolchain.AbstractTestTools;
import junit.framework.Assert;
@@ -45,7 +45,7 @@ public class DependenciesTest007 {
@Test
public void testDependency001() throws Exception {
IncrementalTestHelper ite =
- new IncrementalTestHelper(TestTools.createTempDir("DependenciesTest_", "_001"));
+ new IncrementalTestHelper(AbstractTestTools.createTempDir());
ite.addJavaFile("jack.incremental", "A.java",
"package jack.incremental; \n"+
diff --git a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest008.java b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest008.java
index 2ad9b83..b975637 100644
--- a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest008.java
+++ b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest008.java
@@ -17,9 +17,9 @@
package com.android.jack.experimental.incremental;
import com.android.jack.Main;
-import com.android.jack.TestTools;
import com.android.jack.frontend.FrontendCompilationException;
import com.android.jack.test.helper.IncrementalTestHelper;
+import com.android.jack.test.toolchain.AbstractTestTools;
import junit.framework.Assert;
@@ -42,7 +42,7 @@ public class DependenciesTest008 {
@Test
public void testDependency001() throws Exception {
IncrementalTestHelper ite =
- new IncrementalTestHelper(TestTools.createTempDir("DependenciesTest_", "_001"));
+ new IncrementalTestHelper(AbstractTestTools.createTempDir());
ite.addJavaFile("jack.incremental", "A.java",
"package jack.incremental; \n" +
@@ -73,7 +73,7 @@ public class DependenciesTest008 {
@Test
public void testDependency002() throws Exception {
IncrementalTestHelper ite =
- new IncrementalTestHelper(TestTools.createTempDir("DependenciesTest_", "_002"));
+ new IncrementalTestHelper(AbstractTestTools.createTempDir());
ite.addJavaFile("jack.incremental", "A.java",
"package jack.incremental; \n" +
@@ -97,7 +97,7 @@ public class DependenciesTest008 {
@Test
public void testDependency003() throws Exception {
IncrementalTestHelper ite =
- new IncrementalTestHelper(TestTools.createTempDir("DependenciesTest_", "_003"));
+ new IncrementalTestHelper(AbstractTestTools.createTempDir());
ite.addJavaFile("jack.incremental", "A.java",
"package jack.incremental; \n" +
diff --git a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest009.java b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest009.java
index 24e9c45..1d54acc 100644
--- a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest009.java
+++ b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest009.java
@@ -17,13 +17,13 @@
package com.android.jack.experimental.incremental;
import com.android.jack.Main;
-import com.android.jack.TestTools;
import com.android.jack.analysis.dependency.type.TypeDependencies;
import com.android.jack.library.FileType;
import com.android.jack.library.FileTypeDoesNotExistException;
import com.android.jack.library.InputJackLibrary;
import com.android.jack.library.JackLibraryFactory;
import com.android.jack.test.helper.IncrementalTestHelper;
+import com.android.jack.test.toolchain.AbstractTestTools;
import com.android.sched.util.file.CannotReadException;
import com.android.sched.util.file.Directory;
import com.android.sched.util.file.FileOrDirectory.ChangePermission;
@@ -61,7 +61,7 @@ public class DependenciesTest009 {
@Test
public void testDependency001() throws Exception {
IncrementalTestHelper ite =
- new IncrementalTestHelper(TestTools.createTempDir("DependenciesTest_", "_001"));
+ new IncrementalTestHelper(AbstractTestTools.createTempDir());
ite.addJavaFile("jack.incremental", "A.java", "package jack.incremental; \n"
+ "public class A extends B { }");
diff --git a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest010.java b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest010.java
index d5051bf..f1bb146 100644
--- a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest010.java
+++ b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest010.java
@@ -17,8 +17,8 @@
package com.android.jack.experimental.incremental;
import com.android.jack.Main;
-import com.android.jack.TestTools;
import com.android.jack.test.helper.IncrementalTestHelper;
+import com.android.jack.test.toolchain.AbstractTestTools;
import junit.framework.Assert;
@@ -45,7 +45,7 @@ public class DependenciesTest010 {
@Test
public void testDependency001() throws Exception {
IncrementalTestHelper ite =
- new IncrementalTestHelper(TestTools.createTempDir("DependenciesTest_", "_001"));
+ new IncrementalTestHelper(AbstractTestTools.createTempDir());
ite.addJavaFile("jack.incremental", "A.java", "package jack.incremental; \n"
+ "public class A { "
@@ -132,7 +132,7 @@ public class DependenciesTest010 {
@Test
public void testDependency002() throws Exception {
IncrementalTestHelper ite =
- new IncrementalTestHelper(TestTools.createTempDir("DependenciesTest_", "_002"));
+ new IncrementalTestHelper(AbstractTestTools.createTempDir());
ite.addJavaFile("jack.incremental", "A.java", "package jack.incremental; \n"
+ "import jack.incremental.B;"
diff --git a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest011.java b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest011.java
index fb05a07..a1350cb 100644
--- a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest011.java
+++ b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest011.java
@@ -17,9 +17,9 @@
package com.android.jack.experimental.incremental;
import com.android.jack.Main;
-import com.android.jack.TestTools;
import com.android.jack.frontend.FrontendCompilationException;
import com.android.jack.test.helper.IncrementalTestHelper;
+import com.android.jack.test.toolchain.AbstractTestTools;
import junit.framework.Assert;
@@ -45,7 +45,7 @@ public class DependenciesTest011 {
@Test
public void testDependency001() throws Exception {
IncrementalTestHelper ite =
- new IncrementalTestHelper(TestTools.createTempDir("DependenciesTest_", "_001"));
+ new IncrementalTestHelper(AbstractTestTools.createTempDir());
File f = ite.addJavaFile("jack.incremental", "A.java", "package jack.incremental; \n"
+ "public class A extends Exception { "
diff --git a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest012.java b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest012.java
index db6d6a3..c0a6f11 100644
--- a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest012.java
+++ b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest012.java
@@ -17,9 +17,9 @@
package com.android.jack.experimental.incremental;
import com.android.jack.Main;
-import com.android.jack.TestTools;
import com.android.jack.frontend.FrontendCompilationException;
import com.android.jack.test.helper.IncrementalTestHelper;
+import com.android.jack.test.toolchain.AbstractTestTools;
import junit.framework.Assert;
@@ -44,7 +44,7 @@ public class DependenciesTest012 {
@Test
public void testDependency001() throws Exception {
IncrementalTestHelper ite =
- new IncrementalTestHelper(TestTools.createTempDir("DependenciesTest_", "_001"));
+ new IncrementalTestHelper(AbstractTestTools.createTempDir());
ite.addJavaFile("jack.incremental", "A.java", "package jack.incremental; \n"
+ "public class A { \n"
diff --git a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest013.java b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest013.java
index de6116e..4799e0b 100644
--- a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest013.java
+++ b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest013.java
@@ -17,9 +17,9 @@
package com.android.jack.experimental.incremental;
import com.android.jack.Main;
-import com.android.jack.TestTools;
import com.android.jack.frontend.FrontendCompilationException;
import com.android.jack.test.helper.IncrementalTestHelper;
+import com.android.jack.test.toolchain.AbstractTestTools;
import junit.framework.Assert;
@@ -45,7 +45,7 @@ public class DependenciesTest013 {
@Test
public void testDependency001() throws Exception {
IncrementalTestHelper ite =
- new IncrementalTestHelper(TestTools.createTempDir("DependenciesTest_", "_001"));
+ new IncrementalTestHelper(AbstractTestTools.createTempDir());
ite.addJavaFile("jack.incremental", "A.java", "package jack.incremental; \n"
+ "public class A { \n"
@@ -83,7 +83,7 @@ public class DependenciesTest013 {
@Test
public void testDependency002() throws Exception {
IncrementalTestHelper ite =
- new IncrementalTestHelper(TestTools.createTempDir("DependenciesTest_", "_001"));
+ new IncrementalTestHelper(AbstractTestTools.createTempDir());
ite.addJavaFile("jack.incremental", "A.java", "package jack.incremental; \n"
+ "public class A { \n"
@@ -126,7 +126,7 @@ public class DependenciesTest013 {
@Test
public void testDependency003() throws Exception {
IncrementalTestHelper ite =
- new IncrementalTestHelper(TestTools.createTempDir("DependenciesTest_", "_001"));
+ new IncrementalTestHelper(AbstractTestTools.createTempDir());
ite.addJavaFile("jack.incremental", "A.java", "package jack.incremental; \n"
+ "public class A { \n"
diff --git a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest014.java b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest014.java
index 8f768f0..5a932a6 100644
--- a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest014.java
+++ b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest014.java
@@ -17,9 +17,9 @@
package com.android.jack.experimental.incremental;
import com.android.jack.Main;
-import com.android.jack.TestTools;
import com.android.jack.dx.io.DexBuffer;
import com.android.jack.test.helper.IncrementalTestHelper;
+import com.android.jack.test.toolchain.AbstractTestTools;
import junit.framework.Assert;
@@ -45,7 +45,7 @@ public class DependenciesTest014 {
@Test
public void testDependency001() throws Exception {
IncrementalTestHelper ite =
- new IncrementalTestHelper(TestTools.createTempDir("DependenciesTest_", "_001"));
+ new IncrementalTestHelper(AbstractTestTools.createTempDir());
ite.addJavaFile("jack.incremental", "A.java", "package jack.incremental; \n"
+ "public class A { \n" + "}");
@@ -73,7 +73,7 @@ public class DependenciesTest014 {
@Test
public void testDependency002() throws Exception {
IncrementalTestHelper ite =
- new IncrementalTestHelper(TestTools.createTempDir("DependenciesTest_", "_001"));
+ new IncrementalTestHelper(AbstractTestTools.createTempDir());
ite.addJavaFile("jack.incremental", "A.java", "package jack.incremental; \n"
+ "public class A { \n" + "}");
diff --git a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest015.java b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest015.java
index e316e39..3313763 100644
--- a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest015.java
+++ b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest015.java
@@ -17,10 +17,10 @@
package com.android.jack.experimental.incremental;
import com.android.jack.Main;
-import com.android.jack.TestTools;
import com.android.jack.dx.io.DexBuffer;
import com.android.jack.frontend.FrontendCompilationException;
import com.android.jack.test.helper.IncrementalTestHelper;
+import com.android.jack.test.toolchain.AbstractTestTools;
import junit.framework.Assert;
@@ -49,7 +49,7 @@ public class DependenciesTest015 {
@Test
public void testDependency001() throws Exception {
IncrementalTestHelper iteLib =
- new IncrementalTestHelper(TestTools.createTempDir("DependenciesTest_", "_001_lib"));
+ new IncrementalTestHelper(AbstractTestTools.createTempDir());
File f = iteLib.addJavaFile("jack.incremental", "A.java", "package jack.incremental; \n"
+ "public abstract class A { \n" + "public abstract void m(); }");
@@ -61,7 +61,7 @@ public class DependenciesTest015 {
IncrementalTestHelper iteProg =
- new IncrementalTestHelper(TestTools.createTempDir("DependenciesTest_", "_001_prog"));
+ new IncrementalTestHelper(AbstractTestTools.createTempDir());
iteProg.addJavaFile("jack.incremental", "B.java", "package jack.incremental; \n"
+ "public class B extends A { \n" + " @Override public void m(){} }");
@@ -95,7 +95,7 @@ public class DependenciesTest015 {
@Test
public void testDependency002() throws Exception {
IncrementalTestHelper iteLib =
- new IncrementalTestHelper(TestTools.createTempDir("DependenciesTest_", "_001_lib"));
+ new IncrementalTestHelper(AbstractTestTools.createTempDir());
iteLib.addJavaFile("jack.incremental", "A.java", "package jack.incremental; \n"
+ "public class A { \n" + "public void m() {} }");
@@ -107,7 +107,7 @@ public class DependenciesTest015 {
IncrementalTestHelper iteProg =
- new IncrementalTestHelper(TestTools.createTempDir("DependenciesTest_", "_001_prog"));
+ new IncrementalTestHelper(AbstractTestTools.createTempDir());
iteProg.addJavaFile("jack.incremental", "B.java", "package jack.incremental; \n"
+ "public class B { \n" + " public void m(){} }");
diff --git a/jack-tests/tests/com/android/jack/fibonacci/FibonacciTests.java b/jack-tests/tests/com/android/jack/fibonacci/FibonacciTests.java
index cfbe2f9..a0d687e 100644
--- a/jack-tests/tests/com/android/jack/fibonacci/FibonacciTests.java
+++ b/jack-tests/tests/com/android/jack/fibonacci/FibonacciTests.java
@@ -16,7 +16,6 @@
package com.android.jack.fibonacci;
-import com.android.jack.TestTools;
import com.android.jack.test.category.RuntimeRegressionTest;
import com.android.jack.test.comparator.ComparatorDex;
import com.android.jack.test.helper.CheckDexStructureTestHelper;
diff --git a/jack-tests/tests/com/android/jack/field/FieldTests.java b/jack-tests/tests/com/android/jack/field/FieldTests.java
index 87f2045..587100a 100644
--- a/jack-tests/tests/com/android/jack/field/FieldTests.java
+++ b/jack-tests/tests/com/android/jack/field/FieldTests.java
@@ -16,7 +16,6 @@
package com.android.jack.field;
-import com.android.jack.TestTools;
import com.android.jack.test.category.RuntimeRegressionTest;
import com.android.jack.test.comparator.ComparatorDex;
import com.android.jack.test.helper.CheckDexStructureTestHelper;
diff --git a/jack-tests/tests/com/android/jack/fileconflict/FileConflictTests.java b/jack-tests/tests/com/android/jack/fileconflict/FileConflictTests.java
index b45c4f7..10fe311 100644
--- a/jack-tests/tests/com/android/jack/fileconflict/FileConflictTests.java
+++ b/jack-tests/tests/com/android/jack/fileconflict/FileConflictTests.java
@@ -452,14 +452,14 @@ public class FileConflictTests {
private void runTest002(@Nonnull File jackOutput, boolean zip,
@CheckForNull String collisionPolicy) throws Exception {
// compile source files to a Jack dir
- File jackImport1 = TestTools.createTempDir("jack", "dir");
+ File jackImport1 = AbstractTestTools.createTempDir();
Options options = new Options();
File lib1 = new File(TEST002_DIR, "lib1");
options.addResource(new File(lib1, "rsc"));
TestTools.compileSourceToJack(options, lib1, TestTools.getDefaultBootclasspathString(),
jackImport1, false /* non-zipped */);
- File jackImport2 = TestTools.createTempDir("jack", "dir");
+ File jackImport2 = AbstractTestTools.createTempDir();
options = new Options();
File lib2 = new File(TEST002_DIR, "lib2");
options.addResource(new File(lib2, "rsc"));
diff --git a/jack-tests/tests/com/android/jack/inner/InnerTests.java b/jack-tests/tests/com/android/jack/inner/InnerTests.java
index 26b810a..35d67e3 100644
--- a/jack-tests/tests/com/android/jack/inner/InnerTests.java
+++ b/jack-tests/tests/com/android/jack/inner/InnerTests.java
@@ -16,7 +16,6 @@
package com.android.jack.inner;
-import com.android.jack.TestTools;
import com.android.jack.test.category.RedundantTests;
import com.android.jack.test.category.RuntimeRegressionTest;
import com.android.jack.test.comparator.ComparatorDex;
diff --git a/jack-tests/tests/com/android/jack/java7/BoxingTest.java b/jack-tests/tests/com/android/jack/java7/BoxingTest.java
index 536811c..75bbbc2 100644
--- a/jack-tests/tests/com/android/jack/java7/BoxingTest.java
+++ b/jack-tests/tests/com/android/jack/java7/BoxingTest.java
@@ -17,19 +17,12 @@
package com.android.jack.java7;
import com.android.jack.Main;
-import com.android.jack.Options;
-import com.android.jack.TestTools;
-import com.android.jack.test.category.KnownBugs;
import com.android.jack.test.toolchain.AbstractTestTools;
import com.android.jack.test.toolchain.IToolchain;
-import com.android.jack.test.toolchain.JackBasedToolchain;
import com.android.jack.test.toolchain.Toolchain.SourceLevel;
import org.junit.BeforeClass;
import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import java.io.File;
/**
* JUnit test for compilation of Java 7 features
diff --git a/jack-tests/tests/com/android/jack/multidex/MultiDexOverflowTests.java b/jack-tests/tests/com/android/jack/multidex/MultiDexOverflowTests.java
index 8152c20..9252e95 100644
--- a/jack-tests/tests/com/android/jack/multidex/MultiDexOverflowTests.java
+++ b/jack-tests/tests/com/android/jack/multidex/MultiDexOverflowTests.java
@@ -17,7 +17,6 @@
package com.android.jack.multidex;
import com.android.jack.JackAbortException;
-import com.android.jack.TestTools;
import com.android.jack.backend.dex.DexFileWriter;
import com.android.jack.backend.dex.DexWritingException;
import com.android.jack.backend.dex.MainDexOverflowException;
@@ -56,8 +55,8 @@ public class MultiDexOverflowTests {
@Test
public void testMinimalMainDexOverflowWithMethods() throws Exception {
- File srcFolder = TestTools.createTempDir("src", "dir");
- File outFolder = TestTools.createTempDir("out", "dir");
+ File srcFolder = AbstractTestTools.createTempDir();
+ File outFolder = AbstractTestTools.createTempDir();
int fileCount = 655;
for (int fileIdx = 0; fileIdx < fileCount; fileIdx++) {
@@ -94,8 +93,8 @@ public class MultiDexOverflowTests {
@Test
public void testStandardMainDexOverflowWithFields() throws Exception {
- File srcFolder = TestTools.createTempDir("src", "dir");
- File outFolder = TestTools.createTempDir("out", "dir");
+ File srcFolder = AbstractTestTools.createTempDir();
+ File outFolder = AbstractTestTools.createTempDir();
int fileCount = 655;
for (int fileIdx = 0; fileIdx < fileCount; fileIdx++) {
diff --git a/jack-tests/tests/com/android/jack/shrob/AbstractTest.java b/jack-tests/tests/com/android/jack/shrob/AbstractTest.java
index 22896b6..07185c4 100644
--- a/jack-tests/tests/com/android/jack/shrob/AbstractTest.java
+++ b/jack-tests/tests/com/android/jack/shrob/AbstractTest.java
@@ -18,9 +18,9 @@ package com.android.jack.shrob;
import com.android.jack.Main;
import com.android.jack.ProguardFlags;
-import com.android.jack.TestTools;
import com.android.jack.test.category.KnownBugs;
import com.android.jack.test.category.SlowTests;
+import com.android.jack.test.toolchain.AbstractTestTools;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -50,7 +50,7 @@ public abstract class AbstractTest {
throws Exception;
protected ProguardFlags generateApplyMapping(@Nonnull File mappingFile) throws IOException {
- File applyMapping = TestTools.createTempFile("mapping.flags", null);
+ File applyMapping = AbstractTestTools.createTempFile("mapping.flags", null);
BufferedWriter writer = new BufferedWriter(new FileWriter(applyMapping));
writer.append("-applymapping ");
writer.append(mappingFile.getAbsolutePath());
@@ -59,7 +59,7 @@ public abstract class AbstractTest {
}
protected ProguardFlags generateInjars(@Nonnull File injar) throws IOException {
- File injarFlags = TestTools.createTempFile("injars", ".flags");
+ File injarFlags = AbstractTestTools.createTempFile("injars", ".flags");
BufferedWriter writer = new BufferedWriter(new FileWriter(injarFlags));
writer.append("-injars ");
writer.append(injar.getAbsolutePath());
diff --git a/jack-tests/tests/com/android/jack/shrob/AnnotationsTest.java b/jack-tests/tests/com/android/jack/shrob/AnnotationsTest.java
index cf81902..e624cf7 100644
--- a/jack-tests/tests/com/android/jack/shrob/AnnotationsTest.java
+++ b/jack-tests/tests/com/android/jack/shrob/AnnotationsTest.java
@@ -17,7 +17,6 @@
package com.android.jack.shrob;
import com.android.jack.ProguardFlags;
-import com.android.jack.TestTools;
import com.android.jack.test.comparator.ComparatorDexAnnotations;
import com.android.jack.test.helper.SourceToDexComparisonTestHelper;
import com.android.jack.test.toolchain.AbstractTestTools;
@@ -35,7 +34,8 @@ public class AnnotationsTest extends AbstractTest {
@Nonnull String flagNumber,
@Nonnull String mappingNumber)
throws Exception {
- File testFolder = AbstractTestTools.getTestRootDir("com.android.jack.shrob.test" + testNumber);
+ File shrobFolder = AbstractTestTools.getTestRootDir("com.android.jack.shrob");
+ File testFolder = new File(shrobFolder, "test" + testNumber);
JackBasedToolchain toolchain = AbstractTestTools.getCandidateToolchain(JackBasedToolchain.class);
SourceToDexComparisonTestHelper env =
@@ -44,7 +44,7 @@ public class AnnotationsTest extends AbstractTest {
env.setProguardFlags(
generateApplyMapping(new File(testFolder,"proguard.flags" + flagNumber + ".mapping" + mappingNumber)),
// new ProguardFlags(TestTools.getJackTestFolder("shrob"),"keepDebugInfo.flags"),
- new ProguardFlags(TestTools.getJackTestFolder("shrob"),"keepAllAttributes.flags"),
+ new ProguardFlags(shrobFolder,"keepAllAttributes.flags"),
new ProguardFlags(testFolder,"proguard.flags" + flagNumber));
env.runTest(new ComparatorDexAnnotations(env.getCandidateDex(), env.getReferenceDex()));
}
diff --git a/jack-tests/tests/com/android/jack/tools/merger/MergerTestTools.java b/jack-tests/tests/com/android/jack/tools/merger/MergerTestTools.java
index 6c9b095..c5e5513 100644
--- a/jack-tests/tests/com/android/jack/tools/merger/MergerTestTools.java
+++ b/jack-tests/tests/com/android/jack/tools/merger/MergerTestTools.java
@@ -17,7 +17,6 @@
package com.android.jack.tools.merger;
import com.android.jack.Options;
-import com.android.jack.TestTools;
import com.android.jack.backend.dex.DexFileWriter;
import com.android.jack.test.toolchain.AbstractTestTools;
import com.android.jack.test.toolchain.JackApiToolchain;
@@ -33,14 +32,15 @@ import javax.annotation.Nonnull;
public class MergerTestTools {
@Nonnull
- protected File buildOneDexPerType(@CheckForNull String classpath, @Nonnull File sourceFolder,
+ protected File buildOneDexPerType(@Nonnull File sourceFolder,
boolean withDebug, @CheckForNull OutputStream out, @CheckForNull OutputStream err) throws Exception {
JackApiToolchain toolchain =
AbstractTestTools.getCandidateToolchain(JackApiToolchain.class);
+ String classpath = AbstractTestTools.getClasspathAsString(toolchain.getDefaultBootClasspath());
try {
- File multiDexFolder = TestTools.createTempDir("multi", "dex");
+ File multiDexFolder = AbstractTestTools.createTempDir();
File multiDex = new File(multiDexFolder, DexFileWriter.DEX_FILENAME);
- File internalJackLibraryOutput = TestTools.createTempDir("multiOnDexPerType", "dex");
+ File internalJackLibraryOutput = AbstractTestTools.createTempDir();
toolchain.addProperty(Options.EMIT_LINE_NUMBER_DEBUG_INFO.getName(),
Boolean.toString(withDebug));
diff --git a/jack-tests/tests/com/android/jack/tools/merger/test011/MergerTest011.java b/jack-tests/tests/com/android/jack/tools/merger/test011/MergerTest011.java
index fc593c5..c52b050 100644
--- a/jack-tests/tests/com/android/jack/tools/merger/test011/MergerTest011.java
+++ b/jack-tests/tests/com/android/jack/tools/merger/test011/MergerTest011.java
@@ -17,12 +17,11 @@
package com.android.jack.tools.merger.test011;
import com.android.jack.JackAbortException;
-import com.android.jack.JackUserException;
import com.android.jack.Main;
-import com.android.jack.TestTools;
import com.android.jack.backend.dex.DexWritingException;
import com.android.jack.backend.dex.SingleDexOverflowException;
import com.android.jack.test.category.SlowTests;
+import com.android.jack.test.toolchain.AbstractTestTools;
import com.android.jack.tools.merger.FieldIdOverflowException;
import com.android.jack.tools.merger.MergerTestTools;
import com.android.jack.tools.merger.MethodIdOverflowException;
@@ -62,7 +61,7 @@ public class MergerTest011 extends MergerTestTools {
@Test
public void testMergerWithHighNumberOfMethods() throws Exception {
- File srcFolder = TestTools.createTempDir("oneDexPerType", "SrcFolder");
+ File srcFolder = AbstractTestTools.createTempDir();
// One CstMethodRef is also created for call to object.init()
for (int fileIdx = 0; fileIdx < fileCount; fileIdx++) {
@@ -73,8 +72,7 @@ public class MergerTest011 extends MergerTestTools {
ByteArrayOutputStream err = new ByteArrayOutputStream();
try {
- buildOneDexPerType(TestTools.getDefaultBootclasspathString(), srcFolder,
- /* withDebug = */false, /* out = */ null, err);
+ buildOneDexPerType(srcFolder, /* withDebug = */false, /* out = */ null, err);
Assert.fail();
} catch (JackAbortException e) {
Throwable cause = e.getCause();
@@ -87,7 +85,7 @@ public class MergerTest011 extends MergerTestTools {
@Test
public void testMergerWithHighNumberOfFields() throws Exception {
- File srcFolder = TestTools.createTempDir("oneDexPerType", "SrcFolder");
+ File srcFolder = AbstractTestTools.createTempDir();
for (int fileIdx = 0; fileIdx < fileCount; fileIdx++) {
generateJavaFileWithFields(srcFolder, fileIdx, 100);
@@ -97,8 +95,7 @@ public class MergerTest011 extends MergerTestTools {
ByteArrayOutputStream err = new ByteArrayOutputStream();
try {
- buildOneDexPerType(TestTools.getDefaultBootclasspathString(), srcFolder,
- /* withDebug = */false, /* out = */ null, err);
+ buildOneDexPerType(srcFolder, /* withDebug = */false, /* out = */ null, err);
Assert.fail();
} catch (JackAbortException e) {
Throwable cause = e.getCause();
@@ -112,7 +109,7 @@ public class MergerTest011 extends MergerTestTools {
@Test
@Category(SlowTests.class)
public void testMergerWithHighNumberOfTypes() throws Exception {
- File srcFolder = TestTools.createTempDir("oneDexPerType", "SrcFolder");
+ File srcFolder = AbstractTestTools.createTempDir();
for (int fileIdx = 0; fileIdx < fileCount; fileIdx++) {
generateJavaFileWithTypes(srcFolder, fileIdx, 100);
@@ -122,8 +119,7 @@ public class MergerTest011 extends MergerTestTools {
ByteArrayOutputStream err = new ByteArrayOutputStream();
try {
- buildOneDexPerType(TestTools.getDefaultBootclasspathString(), srcFolder,
- /* withDebug = */false, /* out = */ null, err);
+ buildOneDexPerType(srcFolder, /* withDebug = */false, /* out = */ null, err);
Assert.fail();
} catch (JackAbortException e) {
Throwable cause = e.getCause();
diff --git a/jack-tests/tests/com/android/jack/trycatch/TrycatchTests.java b/jack-tests/tests/com/android/jack/trycatch/TrycatchTests.java
index 98694c8..1f8be89 100644
--- a/jack-tests/tests/com/android/jack/trycatch/TrycatchTests.java
+++ b/jack-tests/tests/com/android/jack/trycatch/TrycatchTests.java
@@ -16,7 +16,6 @@
package com.android.jack.trycatch;
-import com.android.jack.Options;
import com.android.jack.TestTools;
import com.android.jack.test.category.RuntimeRegressionTest;
import com.android.jack.test.helper.RuntimeTestHelper;