summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--jack-tests/src/com/android/jack/test/toolchain/AbstractTestTools.java10
-rw-r--r--jack-tests/tests/com/android/jack/classpath/ClasspathTests.java4
-rw-r--r--jack-tests/tests/com/android/jack/imports/ImportTests.java2
3 files changed, 8 insertions, 8 deletions
diff --git a/jack-tests/src/com/android/jack/test/toolchain/AbstractTestTools.java b/jack-tests/src/com/android/jack/test/toolchain/AbstractTestTools.java
index 4973618..dc27f78 100644
--- a/jack-tests/src/com/android/jack/test/toolchain/AbstractTestTools.java
+++ b/jack-tests/src/com/android/jack/test/toolchain/AbstractTestTools.java
@@ -183,19 +183,19 @@ public abstract class AbstractTestTools {
return new File(getTestsRootDir(), packageName.replace(".", File.separator));
}
- @SuppressWarnings("unchecked")
@Nonnull
- public static final <T extends IToolchain> T getCandidateToolchain() {
+ public static final IToolchain getCandidateToolchain() {
IToolchain result = createToolchain("candidate.toolchain");
- return (T) result;
+ return result;
}
+ @SuppressWarnings("unchecked")
@Nonnull
public static final <T extends IToolchain> T getCandidateToolchain(
@Nonnull Class<? extends IToolchain> clazz) {
- T result = getCandidateToolchain();
+ IToolchain result = getCandidateToolchain();
Assume.assumeTrue(clazz.isAssignableFrom(result.getClass()));
- return result;
+ return (T) result;
}
@Nonnull
diff --git a/jack-tests/tests/com/android/jack/classpath/ClasspathTests.java b/jack-tests/tests/com/android/jack/classpath/ClasspathTests.java
index 37d1127..ba62abc 100644
--- a/jack-tests/tests/com/android/jack/classpath/ClasspathTests.java
+++ b/jack-tests/tests/com/android/jack/classpath/ClasspathTests.java
@@ -113,7 +113,7 @@ public class ClasspathTests {
{
// reference compilation
- toolchain = AbstractTestTools.getCandidateToolchain(JackBasedToolchain.class);
+ toolchain = AbstractTestTools.getCandidateToolchain(JackBasedToolchain.class, excludeList);
File testOut = AbstractTestTools.createTempDir();
File testSrc = new File(testDir, "jack");
toolchain.addToClasspath(defaultBootClasspath)
@@ -127,7 +127,7 @@ public class ClasspathTests {
+ "/com/android/jack/classpath/test003/lib/HasInnersClasses$InnerToDelete"
+ toolchain.getLibraryElementsExtension()).delete();
Assert.assertTrue(deleted);
- toolchain = AbstractTestTools.getCandidateToolchain();
+ toolchain = AbstractTestTools.getCandidateToolchain(JackBasedToolchain.class, excludeList);
File testOut = AbstractTestTools.createTempDir();
File testSrc = new File(testDir, "jack");
toolchain.addToClasspath(defaultBootClasspath)
diff --git a/jack-tests/tests/com/android/jack/imports/ImportTests.java b/jack-tests/tests/com/android/jack/imports/ImportTests.java
index fbcbd61..f7ced7e 100644
--- a/jack-tests/tests/com/android/jack/imports/ImportTests.java
+++ b/jack-tests/tests/com/android/jack/imports/ImportTests.java
@@ -70,7 +70,7 @@ public class ImportTests {
/* zipFiles = */ false,
AbstractTestTools.getTestRootDir("com.android.jack.fibonacci.test001.jack"));
- toolchain = AbstractTestTools.getCandidateToolchain();
+ toolchain = AbstractTestTools.getCandidateToolchain(JackApiToolchainBase.class);
toolchain.addStaticLibs(jackOut);
ByteArrayOutputStream errOut = new ByteArrayOutputStream();