summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Marie Henaff <jmhenaff@google.com>2015-06-12 16:29:20 +0200
committerJean-Marie Henaff <jmhenaff@google.com>2015-06-24 13:53:21 +0200
commitf1828481ebcfee3bddc323fca178a4502a60ceef (patch)
tree1a706277eaae29edc8f7f8532f7686383689cc95
parentc33c369849c5864b1e918fb4995cd88a2f67aba4 (diff)
downloadtoolchain_jack-f1828481ebcfee3bddc323fca178a4502a60ceef.zip
toolchain_jack-f1828481ebcfee3bddc323fca178a4502a60ceef.tar.gz
toolchain_jack-f1828481ebcfee3bddc323fca178a4502a60ceef.tar.bz2
Remove assertion status from Jack sanity checks
- adds a property to set when invoking ant to disable assertion (-Dtests.disable-assertions=true) - remove assertion status modification done in tests (cherry picked from commit 9fcbabb82e5292b7df75ea396eddd34ea8a1558c) Change-Id: Ibfc41fc8b0e7e47c597d3f92e420dfb151681396
-rw-r--r--build.xml45
-rw-r--r--jack-tests/tests/com/android/jack/RegressionTests.java5
-rw-r--r--jack-tests/tests/com/android/jack/annotation/AnnotationTests.java4
-rw-r--r--jack-tests/tests/com/android/jack/arithmetic/ArithmeticTests.java4
-rw-r--r--jack-tests/tests/com/android/jack/array/ArrayTests.java4
-rw-r--r--jack-tests/tests/com/android/jack/assertion/AssertionTests.java4
-rw-r--r--jack-tests/tests/com/android/jack/assign/AssignTests.java4
-rw-r--r--jack-tests/tests/com/android/jack/box/BoxTests.java5
-rw-r--r--jack-tests/tests/com/android/jack/bridge/BridgeTests.java4
-rw-r--r--jack-tests/tests/com/android/jack/cast/CastTests.java5
-rw-r--r--jack-tests/tests/com/android/jack/cast/UselessCastRemoverTest.java5
-rw-r--r--jack-tests/tests/com/android/jack/classpath/ClasspathTests.java5
-rw-r--r--jack-tests/tests/com/android/jack/clinit/ClinitTests.java5
-rw-r--r--jack-tests/tests/com/android/jack/comparison/ComparisonTests.java4
-rw-r--r--jack-tests/tests/com/android/jack/compile/androidtree/bouncycastle/BouncycastleCompilationTest.java1
-rw-r--r--jack-tests/tests/com/android/jack/compile/androidtree/core/CoreCompilationTest.java1
-rw-r--r--jack-tests/tests/com/android/jack/compile/androidtree/dalvik/compilerregressions/CompilerRegressionsTest.java1
-rw-r--r--jack-tests/tests/com/android/jack/compile/androidtree/dalvik/finalizer/FinalizerTest.java1
-rw-r--r--jack-tests/tests/com/android/jack/compile/androidtree/dalvik/omnibus/OmnibusCompilationTest.java1
-rw-r--r--jack-tests/tests/com/android/jack/compile/androidtree/ext/ExtCompilationTest.java1
-rw-r--r--jack-tests/tests/com/android/jack/compile/androidtree/frameworks/FrameworksBaseCompilationTest.java1
-rw-r--r--jack-tests/tests/com/android/jack/compiletime/CompileTimeTests.java7
-rw-r--r--jack-tests/tests/com/android/jack/conditional/ConditionalTests.java5
-rw-r--r--jack-tests/tests/com/android/jack/constant/ConstantTests.java5
-rw-r--r--jack-tests/tests/com/android/jack/debug/DebugTests.java6
-rw-r--r--jack-tests/tests/com/android/jack/dx/DxTests.java7
-rw-r--r--jack-tests/tests/com/android/jack/enums/EnumsTests.java5
-rw-r--r--jack-tests/tests/com/android/jack/error/AnnotationProcessorErrorTest.java7
-rw-r--r--jack-tests/tests/com/android/jack/error/CommandLineErrorTest.java7
-rw-r--r--jack-tests/tests/com/android/jack/error/ErrorTest.java6
-rw-r--r--jack-tests/tests/com/android/jack/error/FileAccessErrorTest.java7
-rw-r--r--jack-tests/tests/com/android/jack/error/JayceFormatErrorTest.java7
-rw-r--r--jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest001.java7
-rw-r--r--jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest002.java7
-rw-r--r--jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest003.java5
-rw-r--r--jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest004.java5
-rw-r--r--jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest005.java5
-rw-r--r--jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest006.java5
-rw-r--r--jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest007.java5
-rw-r--r--jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest008.java5
-rw-r--r--jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest009.java5
-rw-r--r--jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest010.java5
-rw-r--r--jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest011.java5
-rw-r--r--jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest012.java5
-rw-r--r--jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest013.java5
-rw-r--r--jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest014.java5
-rw-r--r--jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest015.java5
-rw-r--r--jack-tests/tests/com/android/jack/external/ExternalTests.java5
-rw-r--r--jack-tests/tests/com/android/jack/fibonacci/FibonacciTests.java5
-rw-r--r--jack-tests/tests/com/android/jack/field/FieldTests.java5
-rw-r--r--jack-tests/tests/com/android/jack/fileconflict/FileConflictTests.java5
-rw-r--r--jack-tests/tests/com/android/jack/flow/FlowTests.java5
-rw-r--r--jack-tests/tests/com/android/jack/generic/basic/GenericTests.java5
-rw-r--r--jack-tests/tests/com/android/jack/ifstatement/IfstatementTests.java5
-rw-r--r--jack-tests/tests/com/android/jack/imports/ImportTests.java5
-rw-r--r--jack-tests/tests/com/android/jack/init/InitTests.java5
-rw-r--r--jack-tests/tests/com/android/jack/inner/InnerTests.java5
-rw-r--r--jack-tests/tests/com/android/jack/instance/InstanceTest.java2
-rw-r--r--jack-tests/tests/com/android/jack/invoke/InvokeTests.java5
-rw-r--r--jack-tests/tests/com/android/jack/jarjar/JarjarTests.java2
-rw-r--r--jack-tests/tests/com/android/jack/java7/BoxingTest.java5
-rw-r--r--jack-tests/tests/com/android/jack/java7/ExceptionsTest.java5
-rw-r--r--jack-tests/tests/com/android/jack/java7/SwitchesTest.java5
-rw-r--r--jack-tests/tests/com/android/jack/java7/TryWithResourcesTests.java5
-rw-r--r--jack-tests/tests/com/android/jack/label/LabelTest.java2
-rw-r--r--jack-tests/tests/com/android/jack/library/LibraryTests.java5
-rw-r--r--jack-tests/tests/com/android/jack/multidex/MultiDexTests.java2
-rw-r--r--jack-tests/tests/com/android/jack/newarray/NewarrayTests.java5
-rw-r--r--jack-tests/tests/com/android/jack/nopackage/NoPackageTests.java5
-rw-r--r--jack-tests/tests/com/android/jack/opcodes/OpcodesTests.java5
-rw-r--r--jack-tests/tests/com/android/jack/optimizations/exprsimplifier/ExprsimplifierTests.java5
-rw-r--r--jack-tests/tests/com/android/jack/optimizations/notsimplifier/NotsimplifierTests.java5
-rw-r--r--jack-tests/tests/com/android/jack/order/OrderTests.java5
-rw-r--r--jack-tests/tests/com/android/jack/preprocessor/PreProcessorTests.java2
-rw-r--r--jack-tests/tests/com/android/jack/resource/ResourceTests.java5
-rw-r--r--jack-tests/tests/com/android/jack/returnstatement/ReturnstatementTests.java5
-rw-r--r--jack-tests/tests/com/android/jack/shrob/AbstractTest.java5
-rw-r--r--jack-tests/tests/com/android/jack/shrob/ShrinkMultiDexTests.java5
-rw-r--r--jack-tests/tests/com/android/jack/shrob/ShrinkTests.java5
-rw-r--r--jack-tests/tests/com/android/jack/string/StringTests.java5
-rw-r--r--jack-tests/tests/com/android/jack/switchstatement/SwitchstatementTests.java5
-rw-r--r--jack-tests/tests/com/android/jack/synchronize/SynchronizeTests.java5
-rw-r--r--jack-tests/tests/com/android/jack/threeaddress/ThreeaddressTests.java5
-rw-r--r--jack-tests/tests/com/android/jack/throwstatement/ThrowstatementTests.java5
-rw-r--r--jack-tests/tests/com/android/jack/tools/merger/test011/MergerTest011.java5
-rw-r--r--jack-tests/tests/com/android/jack/trycatch/TrycatchTests.java5
-rw-r--r--jack-tests/tests/com/android/jack/tryfinally/TryfinallyTests.java5
-rw-r--r--jack-tests/tests/com/android/jack/type/TypeTests.java5
-rw-r--r--jack-tests/tests/com/android/jack/unary/UnaryTests.java5
-rw-r--r--jack-tests/tests/com/android/jack/verify/VerifyTests.java5
-rw-r--r--jack-tests/tests/com/android/sched/SchedTest.java5
-rw-r--r--jack/src/com/android/jack/Jack.java10
-rw-r--r--jack/tests/com/android/jack/ConditionalTest.java1
-rw-r--r--jack/tests/com/android/jack/FibonacciThreeAddressTest.java7
-rw-r--r--jack/tests/com/android/jack/FinallyTest.java6
-rw-r--r--jack/tests/com/android/jack/JarjarTest.java1
-rw-r--r--jack/tests/com/android/jack/MainTest.java7
-rw-r--r--jack/tests/com/android/jack/StaticValuesTest.java6
-rw-r--r--jack/tests/com/android/jack/TestTools.java8
-rw-r--r--jack/tests/com/android/jack/Types.java23
-rw-r--r--jack/tests/com/android/jack/UnaryTest.java6
-rw-r--r--jack/tests/com/android/jack/VersionTest.java5
-rw-r--r--jack/tests/com/android/jack/backend/dex/rop/RopRegisterManagerTest.java6
-rw-r--r--jack/tests/com/android/jack/cfg/BuildCfgErrorTest.java6
-rw-r--r--jack/tests/com/android/jack/cfg/BuildCfgTest.java2
-rw-r--r--jack/tests/com/android/jack/frontend/ArrayTest.java6
-rw-r--r--jack/tests/com/android/jack/frontend/ClinitTest.java7
-rw-r--r--jack/tests/com/android/jack/frontend/ConstantReuseTest.java5
-rw-r--r--jack/tests/com/android/jack/frontend/FieldModifierTest.java2
-rw-r--r--jack/tests/com/android/jack/frontend/GotoTest.java10
-rw-r--r--jack/tests/com/android/jack/frontend/InitTest.java6
-rw-r--r--jack/tests/com/android/jack/frontend/MethodModifierTest.java2
-rw-r--r--jack/tests/com/android/jack/frontend/SwitchTest.java6
-rw-r--r--jack/tests/com/android/jack/frontend/SynchronizedTest.java6
-rw-r--r--jack/tests/com/android/jack/frontend/TypeModifierTest.java2
-rw-r--r--jack/tests/com/android/jack/gwt/BaseGenerationTest.java7
-rw-r--r--jack/tests/com/android/jack/gwt/BinaryLookup.java18
-rw-r--r--jack/tests/com/android/jack/ir/ast/MarkerCollectorTest.java1
-rw-r--r--jack/tests/com/android/jack/ir/impl/ReferenceMapperTest.java9
-rw-r--r--jack/tests/com/android/jack/optimizations/ExpressionSimplifierTest.java1
-rw-r--r--jack/tests/com/android/jack/preprocessor/PreProcessorTest.java7
-rw-r--r--jack/tests/com/android/jack/shrob/TreeTest.java2
-rw-r--r--jack/tests/com/android/jack/statistics/BlockStatisticsOnCore.java6
-rw-r--r--jack/tests/com/android/jack/transformations/ast/ImplicitBlockTest.java6
-rw-r--r--jack/tests/com/android/jack/transformations/ast/SynchronizedTest.java6
-rw-r--r--jack/tests/com/android/jack/transformations/ast/TypeLegalizerTest.java5
-rw-r--r--jack/tests/com/android/jack/transformations/ast/string/StringSplittingTest.java6
-rw-r--r--jack/tests/com/android/jack/transformations/cast/UselessCastRemoverTest.java6
-rw-r--r--sched/tests/com/android/sched/item/ItemsTest.java7
-rw-r--r--sched/tests/com/android/sched/marker/ManagedMarkerTest.java5
-rw-r--r--sched/tests/com/android/sched/scheduler/ManagedVisitorTest.java6
-rw-r--r--sched/tests/com/android/sched/scheduler/SchedulerTests.java2
-rw-r--r--sched/tests/com/android/sched/util/config/cli/TokenIteratorTest.java5
-rw-r--r--sched/tests/com/android/sched/util/file/FileUtilsTest.java7
-rw-r--r--sched/tests/com/android/sched/vfs/VFSTest.java1
135 files changed, 143 insertions, 579 deletions
diff --git a/build.xml b/build.xml
index 3cb65f2..2007a3c 100644
--- a/build.xml
+++ b/build.xml
@@ -1858,6 +1858,10 @@
<property name="jack.tests.output" value="${jack-project.dir}/tests-results"/>
+ <condition property="jack.tests.assertions" value="-da" else="-ea">
+ <istrue value="${tests.disable-assertions}"/>
+ </condition>
+
<filelist id="jack.junit.tests.classpath" dir="/">
<file name="${jack-tests.dist.dir}/${jack-tests.execname}" />
<file name="${ddm-lib.dist.dir}/${ddm-lib.libname}" />
@@ -1871,7 +1875,38 @@
<fail message="tests.config is undefined" unless="tests.config" />
</target>
- <target name="test-jack" depends="tests-check-config, jack-tests, test-jack-nodep">
+ <target name="tests-check-name">
+ <fail message="test.name is undefined" unless="test.name" />
+ </target>
+
+ <target name="test-jack-by-name" description="run Jack tests with name passed via -Dtest.name"
+ depends="tests-check-config, tests-check-name, jack-tests, test-jack-by-name-no-dep">
+ </target>
+
+ <target name="test-jack-by-name-no-dep">
+ <mkdir dir="${jack.tests.output}/test-jack-by-name/html"/>
+ <junit fork="yes" failureproperty="test-jack.failure">
+ <formatter type="xml"/>
+ <jvmarg value="-Dtests.config=${tests.config}"/>
+ <jvmarg value="${jack.tests.assertions}"/>
+ <classpath>
+ <filelist refid="jack.junit.tests.classpath" />
+ </classpath>
+ <test name="${test.name}"
+ todir="${jack.tests.output}/test-jack-by-name/"
+ outfile="test-jack-by-name" />
+ </junit>
+ <junitreport todir="${jack.tests.output}/test-jack-by-name">
+ <fileset dir="${jack.tests.output}/test-jack-by-name">
+ <include name="test-jack-by-name.xml"/>
+ </fileset>
+ <report format="frames" todir="${jack.tests.output}/test-jack-by-name/html"/>
+ </junitreport>
+ <fail message="TESTS FAILED" if="test-jack.failure" />
+ </target>
+
+ <target name="test-jack" description="run Jack tests that must pass before submitting a change"
+ depends="tests-check-config, jack-tests, test-jack-nodep">
</target>
<target name="test-jack-nodep">
@@ -1879,7 +1914,7 @@
<junit fork="yes" failureproperty="test-jack.failure">
<formatter type="xml"/>
<jvmarg value="-Dtests.config=${tests.config}"/>
- <jvmarg value="-ea"/>
+ <jvmarg value="${jack.tests.assertions}"/>
<classpath>
<filelist refid="jack.junit.tests.classpath" />
</classpath>
@@ -1904,7 +1939,7 @@
<junit fork="yes" failureproperty="test-jack.failure">
<formatter type="xml"/>
<jvmarg value="-Dtests.config=${tests.config}"/>
- <jvmarg value="-ea"/>
+ <jvmarg value="${jack.tests.assertions}"/>
<classpath>
<filelist refid="jack.junit.tests.classpath" />
</classpath>
@@ -1929,7 +1964,7 @@
<junit fork="yes" failureproperty="test-jack.failure">
<formatter type="xml"/>
<jvmarg value="-Dtests.config=${tests.config}"/>
- <jvmarg value="-ea"/>
+ <jvmarg value="${jack.tests.assertions}"/>
<classpath>
<filelist refid="jack.junit.tests.classpath" />
</classpath>
@@ -1954,7 +1989,7 @@
freemarker-lib,maths-lib">
<mkdir dir="${jack.tests.output}/test-sched/html"/>
<junit fork="yes" failureproperty="test-jack.failure">
- <jvmarg value="-ea"/>
+ <jvmarg value="-Dtests.config=${tests.config}"/>
<formatter type="xml"/>
<classpath>
<filelist dir="/">
diff --git a/jack-tests/tests/com/android/jack/RegressionTests.java b/jack-tests/tests/com/android/jack/RegressionTests.java
index 606a262..e71d020 100644
--- a/jack-tests/tests/com/android/jack/RegressionTests.java
+++ b/jack-tests/tests/com/android/jack/RegressionTests.java
@@ -109,10 +109,7 @@ public class RegressionTests {
new VerifyTests(),
};
- @BeforeClass
- public static void setUpClass() {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
@Test
public void runRegressionTests() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/annotation/AnnotationTests.java b/jack-tests/tests/com/android/jack/annotation/AnnotationTests.java
index 16cfc0e..c12e734 100644
--- a/jack-tests/tests/com/android/jack/annotation/AnnotationTests.java
+++ b/jack-tests/tests/com/android/jack/annotation/AnnotationTests.java
@@ -68,10 +68,6 @@ public class AnnotationTests extends RuntimeTest {
private static final File ANNOTATION001_PATH =
AbstractTestTools.getTestRootDir("com.android.jack.annotation.test001.jack");
- @BeforeClass
- public static void setUpClass() {
- AnnotationTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
@Test
@Category(RuntimeRegressionTest.class)
public void test001() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/arithmetic/ArithmeticTests.java b/jack-tests/tests/com/android/jack/arithmetic/ArithmeticTests.java
index 28a4272..ea6cc69 100644
--- a/jack-tests/tests/com/android/jack/arithmetic/ArithmeticTests.java
+++ b/jack-tests/tests/com/android/jack/arithmetic/ArithmeticTests.java
@@ -44,10 +44,6 @@ public class ArithmeticTests extends RuntimeTest {
AbstractTestTools.getTestRootDir("com.android.jack.arithmetic.test004"),
"com.android.jack.arithmetic.test004.dx.Tests");
- @BeforeClass
- public static void setUpClass() {
- ArithmeticTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
@Test
@Category(RuntimeRegressionTest.class)
public void test001() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/array/ArrayTests.java b/jack-tests/tests/com/android/jack/array/ArrayTests.java
index db2a4e8..fca896b 100644
--- a/jack-tests/tests/com/android/jack/array/ArrayTests.java
+++ b/jack-tests/tests/com/android/jack/array/ArrayTests.java
@@ -32,10 +32,6 @@ public class ArrayTests extends RuntimeTest {
AbstractTestTools.getTestRootDir("com.android.jack.array.test001"),
"com.android.jack.array.test001.dx.Tests");
- @BeforeClass
- public static void setUpClass() {
- ArrayTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
@Test
@Category(RuntimeRegressionTest.class)
public void test001() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/assertion/AssertionTests.java b/jack-tests/tests/com/android/jack/assertion/AssertionTests.java
index be97229..accb60a 100644
--- a/jack-tests/tests/com/android/jack/assertion/AssertionTests.java
+++ b/jack-tests/tests/com/android/jack/assertion/AssertionTests.java
@@ -41,10 +41,6 @@ public class AssertionTests extends RuntimeTest {
AbstractTestTools.getTestRootDir("com.android.jack.assertion.test003"),
"com.android.jack.assertion.test003.dx.Tests");
- @BeforeClass
- public static void setUpClass() {
- AssertionTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
@Test
// this test must be run with assertions enabled (for now, use dalvik)
@Category({RuntimeRegressionTest.class, KnownBugs.class})
diff --git a/jack-tests/tests/com/android/jack/assign/AssignTests.java b/jack-tests/tests/com/android/jack/assign/AssignTests.java
index 565996a..d64f282 100644
--- a/jack-tests/tests/com/android/jack/assign/AssignTests.java
+++ b/jack-tests/tests/com/android/jack/assign/AssignTests.java
@@ -32,10 +32,6 @@ public class AssignTests extends RuntimeTest {
AbstractTestTools.getTestRootDir("com.android.jack.assign.test001"),
"com.android.jack.assign.test001.dx.Tests");
- @BeforeClass
- public static void setUpClass() {
- AssignTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
@Test
@Category(RuntimeRegressionTest.class)
public void test001() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/box/BoxTests.java b/jack-tests/tests/com/android/jack/box/BoxTests.java
index 9f8c94d..4109a3f 100644
--- a/jack-tests/tests/com/android/jack/box/BoxTests.java
+++ b/jack-tests/tests/com/android/jack/box/BoxTests.java
@@ -22,7 +22,6 @@ import com.android.jack.test.runtime.RuntimeTest;
import com.android.jack.test.runtime.RuntimeTestInfo;
import com.android.jack.test.toolchain.AbstractTestTools;
-import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;
@@ -32,10 +31,6 @@ public class BoxTests extends RuntimeTest {
AbstractTestTools.getTestRootDir("com.android.jack.box.test001"),
"com.android.jack.box.test001.dx.Tests");
- @BeforeClass
- public static void setUpClass() {
- BoxTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
@Test
@Category(RuntimeRegressionTest.class)
public void test001() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/bridge/BridgeTests.java b/jack-tests/tests/com/android/jack/bridge/BridgeTests.java
index 78041a6..030f3fa 100644
--- a/jack-tests/tests/com/android/jack/bridge/BridgeTests.java
+++ b/jack-tests/tests/com/android/jack/bridge/BridgeTests.java
@@ -60,10 +60,6 @@ public class BridgeTests extends RuntimeTest {
AbstractTestTools.getTestRootDir("com.android.jack.bridge.test007"),
"com.android.jack.bridge.test007.dx.Tests");
- @BeforeClass
- public static void setUpClass() {
- BridgeTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
@Test
@Category(RuntimeRegressionTest.class)
public void test001() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/cast/CastTests.java b/jack-tests/tests/com/android/jack/cast/CastTests.java
index 7401698..0debeaf 100644
--- a/jack-tests/tests/com/android/jack/cast/CastTests.java
+++ b/jack-tests/tests/com/android/jack/cast/CastTests.java
@@ -63,11 +63,6 @@ public class CastTests extends RuntimeTest {
AbstractTestTools.getTestRootDir("com.android.jack.cast.useless002"),
"com.android.jack.cast.useless002.dx.Tests");
- @BeforeClass
- public static void setUpClass() {
- CastTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
-
@Test
@Category(RuntimeRegressionTest.class)
public void explicit001() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/cast/UselessCastRemoverTest.java b/jack-tests/tests/com/android/jack/cast/UselessCastRemoverTest.java
index 87cdf0f..6cd4f83 100644
--- a/jack-tests/tests/com/android/jack/cast/UselessCastRemoverTest.java
+++ b/jack-tests/tests/com/android/jack/cast/UselessCastRemoverTest.java
@@ -28,7 +28,6 @@ import org.jf.dexlib.CodeItem;
import org.jf.dexlib.DexFile;
import org.jf.dexlib.Code.Instruction;
import org.jf.dexlib.Code.Opcode;
-import org.junit.BeforeClass;
import org.junit.Test;
import java.io.File;
@@ -45,10 +44,6 @@ public class UselessCastRemoverTest {
@Nonnull
private static final String CAST_USELESS003 = "com/android/jack/cast/useless003/jack/UselessCast";
- @BeforeClass
- public static void setUp() throws Exception {
- UselessCastRemoverTest.class.getClassLoader().setDefaultAssertionStatus(true);
- }
@Test
public void test001() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/classpath/ClasspathTests.java b/jack-tests/tests/com/android/jack/classpath/ClasspathTests.java
index c69991d..fccd764 100644
--- a/jack-tests/tests/com/android/jack/classpath/ClasspathTests.java
+++ b/jack-tests/tests/com/android/jack/classpath/ClasspathTests.java
@@ -44,11 +44,6 @@ import java.util.List;
public class ClasspathTests {
- @BeforeClass
- public static void setUpClass() {
- ClasspathTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
-
@Test
public void test001() throws Exception {
File libOut = AbstractTestTools.createTempDir();
diff --git a/jack-tests/tests/com/android/jack/clinit/ClinitTests.java b/jack-tests/tests/com/android/jack/clinit/ClinitTests.java
index c1aaa54..6104fe9 100644
--- a/jack-tests/tests/com/android/jack/clinit/ClinitTests.java
+++ b/jack-tests/tests/com/android/jack/clinit/ClinitTests.java
@@ -28,11 +28,6 @@ public class ClinitTests {
public static final String CLASS_WITH_VARIABLE_INIT_BINARY_NAME
= "com/android/jack/clinit/jack/ClInitWithVariableInit";
- @Before
- public void setUp() throws Exception {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
- }
-
@Test
public void testCompileWithClinit() throws Exception {
IToolchain toolchain = AbstractTestTools.getCandidateToolchain();
diff --git a/jack-tests/tests/com/android/jack/comparison/ComparisonTests.java b/jack-tests/tests/com/android/jack/comparison/ComparisonTests.java
index 978e804..ab8ba19 100644
--- a/jack-tests/tests/com/android/jack/comparison/ComparisonTests.java
+++ b/jack-tests/tests/com/android/jack/comparison/ComparisonTests.java
@@ -32,10 +32,6 @@ public class ComparisonTests extends RuntimeTest {
AbstractTestTools.getTestRootDir("com.android.jack.comparison.test001"),
"com.android.jack.comparison.test001.dx.Tests");
- @BeforeClass
- public static void setUpClass() {
- ComparisonTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
@Test
@Category(RuntimeRegressionTest.class)
public void test001() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/compile/androidtree/bouncycastle/BouncycastleCompilationTest.java b/jack-tests/tests/com/android/jack/compile/androidtree/bouncycastle/BouncycastleCompilationTest.java
index 8cf5cc8..ebf3ae7 100644
--- a/jack-tests/tests/com/android/jack/compile/androidtree/bouncycastle/BouncycastleCompilationTest.java
+++ b/jack-tests/tests/com/android/jack/compile/androidtree/bouncycastle/BouncycastleCompilationTest.java
@@ -45,7 +45,6 @@ public class BouncycastleCompilationTest {
@BeforeClass
public static void setUpClass() {
- BouncycastleCompilationTest.class.getClassLoader().setDefaultAssertionStatus(true);
CLASSPATH = new File[] {
TestTools.getFromAndroidTree(
"out/target/common/obj/JAVA_LIBRARIES/core-libart_intermediates/classes.jack")
diff --git a/jack-tests/tests/com/android/jack/compile/androidtree/core/CoreCompilationTest.java b/jack-tests/tests/com/android/jack/compile/androidtree/core/CoreCompilationTest.java
index 50c4936..bf4bd52 100644
--- a/jack-tests/tests/com/android/jack/compile/androidtree/core/CoreCompilationTest.java
+++ b/jack-tests/tests/com/android/jack/compile/androidtree/core/CoreCompilationTest.java
@@ -45,7 +45,6 @@ public class CoreCompilationTest {
@BeforeClass
public static void setUpClass() {
- CoreCompilationTest.class.getClassLoader().setDefaultAssertionStatus(true);
SOURCELIST = TestTools.getTargetLibSourcelist("core-libart");
}
diff --git a/jack-tests/tests/com/android/jack/compile/androidtree/dalvik/compilerregressions/CompilerRegressionsTest.java b/jack-tests/tests/com/android/jack/compile/androidtree/dalvik/compilerregressions/CompilerRegressionsTest.java
index 9840539..2f4df46 100644
--- a/jack-tests/tests/com/android/jack/compile/androidtree/dalvik/compilerregressions/CompilerRegressionsTest.java
+++ b/jack-tests/tests/com/android/jack/compile/androidtree/dalvik/compilerregressions/CompilerRegressionsTest.java
@@ -33,7 +33,6 @@ public class CompilerRegressionsTest {
@BeforeClass
public static void setUpClass() {
- CompilerRegressionsTest.class.getClassLoader().setDefaultAssertionStatus(true);
BOOTCLASSPATH = new File[] {TestTools.getFromAndroidTree(
"out/target/common/obj/JAVA_LIBRARIES/core-libart_intermediates/classes.jack")};
}
diff --git a/jack-tests/tests/com/android/jack/compile/androidtree/dalvik/finalizer/FinalizerTest.java b/jack-tests/tests/com/android/jack/compile/androidtree/dalvik/finalizer/FinalizerTest.java
index e92c1c7..182e641 100644
--- a/jack-tests/tests/com/android/jack/compile/androidtree/dalvik/finalizer/FinalizerTest.java
+++ b/jack-tests/tests/com/android/jack/compile/androidtree/dalvik/finalizer/FinalizerTest.java
@@ -33,7 +33,6 @@ public class FinalizerTest {
@BeforeClass
public static void setUpClass() {
- FinalizerTest.class.getClassLoader().setDefaultAssertionStatus(true);
BOOTCLASSPATH = new File[] {TestTools.getFromAndroidTree(
"out/target/common/obj/JAVA_LIBRARIES/core-libart_intermediates/classes.jack")};
}
diff --git a/jack-tests/tests/com/android/jack/compile/androidtree/dalvik/omnibus/OmnibusCompilationTest.java b/jack-tests/tests/com/android/jack/compile/androidtree/dalvik/omnibus/OmnibusCompilationTest.java
index ff3572f..681886a 100644
--- a/jack-tests/tests/com/android/jack/compile/androidtree/dalvik/omnibus/OmnibusCompilationTest.java
+++ b/jack-tests/tests/com/android/jack/compile/androidtree/dalvik/omnibus/OmnibusCompilationTest.java
@@ -35,7 +35,6 @@ public class OmnibusCompilationTest {
@BeforeClass
public static void setUpClass() {
- OmnibusCompilationTest.class.getClassLoader().setDefaultAssertionStatus(true);
BOOTCLASSPATH = new File[] {TestTools.getFromAndroidTree(
"out/target/common/obj/JAVA_LIBRARIES/core-libart_intermediates/classes.jack")};
}
diff --git a/jack-tests/tests/com/android/jack/compile/androidtree/ext/ExtCompilationTest.java b/jack-tests/tests/com/android/jack/compile/androidtree/ext/ExtCompilationTest.java
index 5484f95..5a3f96b 100644
--- a/jack-tests/tests/com/android/jack/compile/androidtree/ext/ExtCompilationTest.java
+++ b/jack-tests/tests/com/android/jack/compile/androidtree/ext/ExtCompilationTest.java
@@ -43,7 +43,6 @@ public class ExtCompilationTest {
@BeforeClass
public static void setUpClass() {
- ExtCompilationTest.class.getClassLoader().setDefaultAssertionStatus(true);
CLASSPATH = new File[] {TestTools.getFromAndroidTree(
"out/target/common/obj/JAVA_LIBRARIES/core-libart_intermediates/classes.jack")};
REF_CLASSPATH = new File[] {TestTools.getFromAndroidTree(
diff --git a/jack-tests/tests/com/android/jack/compile/androidtree/frameworks/FrameworksBaseCompilationTest.java b/jack-tests/tests/com/android/jack/compile/androidtree/frameworks/FrameworksBaseCompilationTest.java
index 986ed6b..e63f8ea 100644
--- a/jack-tests/tests/com/android/jack/compile/androidtree/frameworks/FrameworksBaseCompilationTest.java
+++ b/jack-tests/tests/com/android/jack/compile/androidtree/frameworks/FrameworksBaseCompilationTest.java
@@ -39,7 +39,6 @@ public class FrameworksBaseCompilationTest {
@BeforeClass
public static void setUpClass() {
- FrameworksBaseCompilationTest.class.getClassLoader().setDefaultAssertionStatus(true);
CLASSPATH = new File[] {
TestTools.getFromAndroidTree(
"out/target/common/obj/JAVA_LIBRARIES/core-libart_intermediates/classes.jack"),
diff --git a/jack-tests/tests/com/android/jack/compiletime/CompileTimeTests.java b/jack-tests/tests/com/android/jack/compiletime/CompileTimeTests.java
index 4806c71..f7bdb02 100644
--- a/jack-tests/tests/com/android/jack/compiletime/CompileTimeTests.java
+++ b/jack-tests/tests/com/android/jack/compiletime/CompileTimeTests.java
@@ -19,17 +19,10 @@ package com.android.jack.compiletime;
import com.android.jack.test.toolchain.AbstractTestTools;
import com.android.jack.test.toolchain.IToolchain;
-import org.junit.BeforeClass;
import org.junit.Test;
public class CompileTimeTests {
-
- @BeforeClass
- public static void setUpClass() {
- CompileTimeTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
-
@Test
public void test001() throws Exception {
IToolchain toolchain = AbstractTestTools.getCandidateToolchain();
diff --git a/jack-tests/tests/com/android/jack/conditional/ConditionalTests.java b/jack-tests/tests/com/android/jack/conditional/ConditionalTests.java
index c7d4254..bafb3bf 100644
--- a/jack-tests/tests/com/android/jack/conditional/ConditionalTests.java
+++ b/jack-tests/tests/com/android/jack/conditional/ConditionalTests.java
@@ -22,7 +22,6 @@ import com.android.jack.test.runtime.RuntimeTest;
import com.android.jack.test.runtime.RuntimeTestInfo;
import com.android.jack.test.toolchain.AbstractTestTools;
-import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;
@@ -56,10 +55,6 @@ public class ConditionalTests extends RuntimeTest {
AbstractTestTools.getTestRootDir("com.android.jack.conditional.test007"),
"com.android.jack.conditional.test007.dx.Tests");
- @BeforeClass
- public static void setUpClass() {
- ConditionalTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
@Test
@Category(RuntimeRegressionTest.class)
public void test001() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/constant/ConstantTests.java b/jack-tests/tests/com/android/jack/constant/ConstantTests.java
index 7c80c25..6a40a03 100644
--- a/jack-tests/tests/com/android/jack/constant/ConstantTests.java
+++ b/jack-tests/tests/com/android/jack/constant/ConstantTests.java
@@ -31,7 +31,6 @@ import org.jf.dexlib.CodeItem;
import org.jf.dexlib.DexFile;
import org.jf.dexlib.Code.Instruction;
import org.jf.dexlib.Code.Opcode;
-import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;
@@ -74,10 +73,6 @@ public class ConstantTests extends RuntimeTest {
AbstractTestTools.getTestRootDir("com.android.jack.constant.test007"),
"com.android.jack.constant.test007.dx.Tests");
- @BeforeClass
- public static void setUpClass() {
- ConstantTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
@Test
@Category(RuntimeRegressionTest.class)
public void clazz() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/debug/DebugTests.java b/jack-tests/tests/com/android/jack/debug/DebugTests.java
index 53e44a3..bbdba23 100644
--- a/jack-tests/tests/com/android/jack/debug/DebugTests.java
+++ b/jack-tests/tests/com/android/jack/debug/DebugTests.java
@@ -23,7 +23,6 @@ import com.android.jack.test.runtime.RuntimeTest;
import com.android.jack.test.runtime.RuntimeTestInfo;
import com.android.jack.test.toolchain.AbstractTestTools;
-import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;
@@ -43,11 +42,6 @@ public class DebugTests extends RuntimeTest {
AbstractTestTools.getTestRootDir("com.android.jack.debug.test004"),
"com.android.jack.debug.test004.dx.Tests");
- @BeforeClass
- public static void setUpClass() {
- DebugTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
-
@Test
@Category(RuntimeRegressionTest.class)
public void test001() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/dx/DxTests.java b/jack-tests/tests/com/android/jack/dx/DxTests.java
index 4aaea78..44eb239 100644
--- a/jack-tests/tests/com/android/jack/dx/DxTests.java
+++ b/jack-tests/tests/com/android/jack/dx/DxTests.java
@@ -27,15 +27,14 @@ import com.android.jack.test.toolchain.IToolchain;
import junit.framework.Assert;
+import org.jf.dexlib.ClassDataItem.EncodedMethod;
import org.jf.dexlib.CodeItem;
import org.jf.dexlib.DexFile;
-import org.jf.dexlib.ClassDataItem.EncodedMethod;
import org.jf.dexlib.Code.Instruction;
import org.jf.dexlib.Code.Opcode;
import org.jf.dexlib.Code.Analysis.AnalyzedInstruction;
import org.jf.dexlib.Code.Analysis.MethodAnalyzer;
import org.jf.dexlib.Code.Format.Instruction23x;
-import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.experimental.categories.Category;
@@ -58,10 +57,6 @@ public class DxTests extends RuntimeTest {
AbstractTestTools.getTestRootDir("com.android.jack.dx.overlapping"),
"com.android.jack.dx.overlapping.dx.Tests");
- @BeforeClass
- public static void setUpClass() {
- DxTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
@Test
@Category(RuntimeRegressionTest.class)
public void compiler() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/enums/EnumsTests.java b/jack-tests/tests/com/android/jack/enums/EnumsTests.java
index 0b6bb7d..1274803 100644
--- a/jack-tests/tests/com/android/jack/enums/EnumsTests.java
+++ b/jack-tests/tests/com/android/jack/enums/EnumsTests.java
@@ -22,7 +22,6 @@ import com.android.jack.test.runtime.RuntimeTest;
import com.android.jack.test.runtime.RuntimeTestInfo;
import com.android.jack.test.toolchain.AbstractTestTools;
-import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;
@@ -40,10 +39,6 @@ public class EnumsTests extends RuntimeTest {
AbstractTestTools.getTestRootDir("com.android.jack.enums.test003"),
"com.android.jack.enums.test003.dx.Tests");
- @BeforeClass
- public static void setUpClass() {
- EnumsTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
@Test
@Category(RuntimeRegressionTest.class)
public void test001() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/error/AnnotationProcessorErrorTest.java b/jack-tests/tests/com/android/jack/error/AnnotationProcessorErrorTest.java
index 9eb04ed..eb0c93f 100644
--- a/jack-tests/tests/com/android/jack/error/AnnotationProcessorErrorTest.java
+++ b/jack-tests/tests/com/android/jack/error/AnnotationProcessorErrorTest.java
@@ -19,7 +19,6 @@ package com.android.jack.error;
import com.google.common.io.Files;
import com.android.jack.JackAbortException;
-import com.android.jack.Main;
import com.android.jack.backend.jayce.JayceFileImporter.CollisionPolicy;
import com.android.jack.errorhandling.annotationprocessor.ResourceAnnotationProcessor;
import com.android.jack.errorhandling.annotationprocessor.ResourceAnnotationTest;
@@ -38,7 +37,6 @@ import junit.framework.Assert;
import org.jf.dexlib.ClassDefItem;
import org.jf.dexlib.DexFile;
-import org.junit.BeforeClass;
import org.junit.Test;
import java.io.ByteArrayOutputStream;
@@ -56,11 +54,6 @@ import javax.annotation.Nonnull;
*/
public class AnnotationProcessorErrorTest {
- @BeforeClass
- public static void setUpClass() {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
- }
-
/**
* Checks that compilation succeed when running annotation processor to generate resource file.
*/
diff --git a/jack-tests/tests/com/android/jack/error/CommandLineErrorTest.java b/jack-tests/tests/com/android/jack/error/CommandLineErrorTest.java
index 30379d5..a404a8b 100644
--- a/jack-tests/tests/com/android/jack/error/CommandLineErrorTest.java
+++ b/jack-tests/tests/com/android/jack/error/CommandLineErrorTest.java
@@ -16,7 +16,6 @@
package com.android.jack.error;
-import com.android.jack.Main;
import com.android.jack.frontend.FrontendCompilationException;
import com.android.jack.test.helper.ErrorTestHelper;
import com.android.jack.test.toolchain.AbstractTestTools;
@@ -24,7 +23,6 @@ import com.android.jack.test.toolchain.JackApiToolchainBase;
import junit.framework.Assert;
-import org.junit.BeforeClass;
import org.junit.Test;
import java.io.ByteArrayOutputStream;
@@ -35,11 +33,6 @@ import java.io.File;
*/
public class CommandLineErrorTest {
- @BeforeClass
- public static void setUpClass() {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
- }
-
/**
* Checks that compilation ends correctly when arguments define no source and no import.
*/
diff --git a/jack-tests/tests/com/android/jack/error/ErrorTest.java b/jack-tests/tests/com/android/jack/error/ErrorTest.java
index cb419a0..3afc22b 100644
--- a/jack-tests/tests/com/android/jack/error/ErrorTest.java
+++ b/jack-tests/tests/com/android/jack/error/ErrorTest.java
@@ -22,7 +22,6 @@ import com.android.jack.test.toolchain.JackApiToolchainBase;
import junit.framework.Assert;
-import org.junit.BeforeClass;
import org.junit.Test;
import java.io.ByteArrayOutputStream;
@@ -35,11 +34,6 @@ import javax.annotation.Nonnull;
*/
public class ErrorTest {
- @BeforeClass
- public static void setUpClass() {
- ErrorTest.class.getClassLoader().setDefaultAssertionStatus(true);
- }
-
@Test
public void testError001() throws Exception {
checkInternalCompilerException("error.test001");
diff --git a/jack-tests/tests/com/android/jack/error/FileAccessErrorTest.java b/jack-tests/tests/com/android/jack/error/FileAccessErrorTest.java
index 5ee022a..d4429c5 100644
--- a/jack-tests/tests/com/android/jack/error/FileAccessErrorTest.java
+++ b/jack-tests/tests/com/android/jack/error/FileAccessErrorTest.java
@@ -18,7 +18,6 @@ package com.android.jack.error;
import com.android.jack.JackAbortException;
import com.android.jack.JackUserException;
-import com.android.jack.Main;
import com.android.jack.backend.jayce.JayceFileImporter;
import com.android.jack.library.FileType;
import com.android.jack.library.InputJackLibrary;
@@ -37,7 +36,6 @@ import com.android.sched.vfs.InputVFile;
import junit.framework.Assert;
-import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;
@@ -50,11 +48,6 @@ import java.util.Iterator;
*/
public class FileAccessErrorTest {
- @BeforeClass
- public static void setUpClass() {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
- }
-
/**
* Checks that compilation fails correctly when folder to generate jack files is not readable.
*/
diff --git a/jack-tests/tests/com/android/jack/error/JayceFormatErrorTest.java b/jack-tests/tests/com/android/jack/error/JayceFormatErrorTest.java
index f670a0b..adfea25 100644
--- a/jack-tests/tests/com/android/jack/error/JayceFormatErrorTest.java
+++ b/jack-tests/tests/com/android/jack/error/JayceFormatErrorTest.java
@@ -17,7 +17,6 @@
package com.android.jack.error;
import com.android.jack.JackAbortException;
-import com.android.jack.Main;
import com.android.jack.jayce.JayceProperties;
import com.android.jack.library.FileType;
import com.android.jack.library.JackLibrary;
@@ -31,7 +30,6 @@ import com.android.jack.test.toolchain.JackApiToolchainBase;
import junit.framework.Assert;
-import org.junit.BeforeClass;
import org.junit.Test;
import java.io.ByteArrayOutputStream;
@@ -42,11 +40,6 @@ import java.io.File;
*/
public class JayceFormatErrorTest {
- @BeforeClass
- public static void setUpClass() {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
- }
-
/**
* Checks that compilation fails correctly when a jayce file is corrupted.
*/
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 f53569d..ba61f26 100644
--- a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest001.java
+++ b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest001.java
@@ -16,14 +16,12 @@
package com.android.jack.experimental.incremental;
-import com.android.jack.Main;
import com.android.jack.frontend.FrontendCompilationException;
import com.android.jack.test.helper.IncrementalTestHelper;
import com.android.jack.test.toolchain.AbstractTestTools;
import junit.framework.Assert;
-import org.junit.BeforeClass;
import org.junit.Test;
import java.io.ByteArrayOutputStream;
@@ -35,11 +33,6 @@ import java.util.List;
*/
public class DependenciesTest001 {
- @BeforeClass
- public static void setUpClass() {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
- }
-
/**
* Checks that compilation failed due to deletion of B.
* Compilation must recompile A and failed since B does not longer exists.
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 0699009..bdaba68 100644
--- a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest002.java
+++ b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest002.java
@@ -16,13 +16,11 @@
package com.android.jack.experimental.incremental;
-import com.android.jack.Main;
import com.android.jack.test.helper.IncrementalTestHelper;
import com.android.jack.test.toolchain.AbstractTestTools;
import junit.framework.Assert;
-import org.junit.BeforeClass;
import org.junit.Test;
import java.util.List;
@@ -32,11 +30,6 @@ import java.util.List;
*/
public class DependenciesTest002 {
- @BeforeClass
- public static void setUpClass() {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
- }
-
/**
* Check that adding a more precise method is well detected.
*/
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 cfbee6f..ef22e19 100644
--- a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest003.java
+++ b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest003.java
@@ -32,10 +32,7 @@ import java.util.List;
*/
public class DependenciesTest003 {
- @BeforeClass
- public static void setUpClass() {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
/**
* Check that file modification implying to transform an interface call to a virtual call is well
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 887f9f2..50e401a 100644
--- a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest004.java
+++ b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest004.java
@@ -32,10 +32,7 @@ import java.util.List;
*/
public class DependenciesTest004 {
- @BeforeClass
- public static void setUpClass() {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
/**
* Check that changing a class into an interface is well detected.
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 b1c96cc..1fda728 100644
--- a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest005.java
+++ b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest005.java
@@ -32,10 +32,7 @@ import java.util.List;
*/
public class DependenciesTest005 {
- @BeforeClass
- public static void setUpClass() {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
/**
* Check that runtime is correct after incremental compilation due to a constant modification.
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 0f1d0e2..4a8fe94 100644
--- a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest006.java
+++ b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest006.java
@@ -34,10 +34,7 @@ import java.util.List;
*/
public class DependenciesTest006 {
- @BeforeClass
- public static void setUpClass() {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
/**
* Check that runtime is correct after class renaming.
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 389b501..649a0fe 100644
--- a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest007.java
+++ b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest007.java
@@ -32,10 +32,7 @@ import java.util.List;
*/
public class DependenciesTest007 {
- @BeforeClass
- public static void setUpClass() {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
/**
* Check that runtime is correct after transformation of an interface call to a virtual call.
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 895c3e8..d3c0ab9 100644
--- a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest008.java
+++ b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest008.java
@@ -31,10 +31,7 @@ import org.junit.Test;
*/
public class DependenciesTest008 {
- @BeforeClass
- public static void setUpClass() {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
/**
* Check that jack files are deleted according to recompiled files.
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 ca77390..db51b6b 100644
--- a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest009.java
+++ b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest009.java
@@ -44,10 +44,7 @@ import javax.annotation.Nonnull;
*/
public class DependenciesTest009 {
- @BeforeClass
- public static void setUpClass() {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
/**
* Check that usages does not change during incremental compilation and that dependencies are
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 062ba0b..266a59c 100644
--- a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest010.java
+++ b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest010.java
@@ -32,10 +32,7 @@ import java.util.List;
*/
public class DependenciesTest010 {
- @BeforeClass
- public static void setUpClass() {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
/**
* Check that incremental compilation support switch on constant value.
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 4fefa29..6fa081d 100644
--- a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest011.java
+++ b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest011.java
@@ -34,10 +34,7 @@ import java.util.List;
*/
public class DependenciesTest011 {
- @BeforeClass
- public static void setUpClass() {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
/**
* Check that incremental compilation support throws declaration.
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 d19a243..242efe7 100644
--- a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest012.java
+++ b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest012.java
@@ -33,10 +33,7 @@ import java.io.File;
*/
public class DependenciesTest012 {
- @BeforeClass
- public static void setUpClass() {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
/**
* Check that incremental compilation support class literal usages.
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 b29ca2a..885c9f3 100644
--- a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest013.java
+++ b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest013.java
@@ -34,10 +34,7 @@ import java.io.File;
*/
public class DependenciesTest013 {
- @BeforeClass
- public static void setUpClass() {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
/**
* Check that incremental compilation support array creation.
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 1d8ac8e..02f87fe 100644
--- a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest014.java
+++ b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest014.java
@@ -34,10 +34,7 @@ import java.io.FileInputStream;
*/
public class DependenciesTest014 {
- @BeforeClass
- public static void setUpClass() {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
/**
* Check that incremental compilation works when file without dependency is deleted.
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 35c351f..9e67b7d 100644
--- a/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest015.java
+++ b/jack-tests/tests/com/android/jack/experimental/incremental/DependenciesTest015.java
@@ -38,10 +38,7 @@ import java.util.Arrays;
*/
public class DependenciesTest015 {
- @BeforeClass
- public static void setUpClass() {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
/**
* Check that incremental compilation works when library on classpath is modified.
diff --git a/jack-tests/tests/com/android/jack/external/ExternalTests.java b/jack-tests/tests/com/android/jack/external/ExternalTests.java
index 9983828..39d6efa 100644
--- a/jack-tests/tests/com/android/jack/external/ExternalTests.java
+++ b/jack-tests/tests/com/android/jack/external/ExternalTests.java
@@ -32,10 +32,7 @@ public class ExternalTests extends RuntimeTest {
AbstractTestTools.getTestRootDir("com.android.jack.external.test001"),
"com.android.jack.external.test001.dx.Tests");
- @BeforeClass
- public static void setUpClass() {
- ExternalTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
@Test
@Category(RuntimeRegressionTest.class)
public void test001() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/fibonacci/FibonacciTests.java b/jack-tests/tests/com/android/jack/fibonacci/FibonacciTests.java
index 507ba3d..fcb09d6 100644
--- a/jack-tests/tests/com/android/jack/fibonacci/FibonacciTests.java
+++ b/jack-tests/tests/com/android/jack/fibonacci/FibonacciTests.java
@@ -37,10 +37,7 @@ public class FibonacciTests extends RuntimeTest {
AbstractTestTools.getTestRootDir("com.android.jack.fibonacci.test001"),
"com.android.jack.fibonacci.test001.dx.Tests");
- @BeforeClass
- public static void setUpClass() {
- FibonacciTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
@Test
@Category(RuntimeRegressionTest.class)
diff --git a/jack-tests/tests/com/android/jack/field/FieldTests.java b/jack-tests/tests/com/android/jack/field/FieldTests.java
index 4a2bfa1..9ce3b1e 100644
--- a/jack-tests/tests/com/android/jack/field/FieldTests.java
+++ b/jack-tests/tests/com/android/jack/field/FieldTests.java
@@ -66,10 +66,7 @@ public class FieldTests extends RuntimeTest {
AbstractTestTools.getTestRootDir("com.android.jack.field.static005"),
"com.android.jack.field.static005.dx.Tests");
- @BeforeClass
- public static void setUpClass() {
- FieldTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
@Test
@Category(RuntimeRegressionTest.class)
public void instance001() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/fileconflict/FileConflictTests.java b/jack-tests/tests/com/android/jack/fileconflict/FileConflictTests.java
index eb90ff2..a22ca83 100644
--- a/jack-tests/tests/com/android/jack/fileconflict/FileConflictTests.java
+++ b/jack-tests/tests/com/android/jack/fileconflict/FileConflictTests.java
@@ -84,10 +84,7 @@ public class FileConflictTests {
private static final File TEST002_DIR =
AbstractTestTools.getTestRootDir("com.android.jack.fileconflict.test002.jack");
- @BeforeClass
- public static void setUpClass() {
- FileConflictTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
/**
* Test the behavior of Jack when importing 2 Jack folders containing conflicting Jack files, and
diff --git a/jack-tests/tests/com/android/jack/flow/FlowTests.java b/jack-tests/tests/com/android/jack/flow/FlowTests.java
index 527b3cb..4bf07b7 100644
--- a/jack-tests/tests/com/android/jack/flow/FlowTests.java
+++ b/jack-tests/tests/com/android/jack/flow/FlowTests.java
@@ -36,10 +36,7 @@ public class FlowTests extends RuntimeTest {
AbstractTestTools.getTestRootDir("com.android.jack.flow.loop"),
"com.android.jack.flow.loop.dx.Tests");
- @BeforeClass
- public static void setUpClass() {
- FlowTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
@Test
@Category(RuntimeRegressionTest.class)
public void cfg001() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/generic/basic/GenericTests.java b/jack-tests/tests/com/android/jack/generic/basic/GenericTests.java
index 31ae91f..c410a93 100644
--- a/jack-tests/tests/com/android/jack/generic/basic/GenericTests.java
+++ b/jack-tests/tests/com/android/jack/generic/basic/GenericTests.java
@@ -27,10 +27,7 @@ import org.junit.Test;
*/
public class GenericTests {
- @BeforeClass
- public static void setUpClass() {
- GenericTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
/**
* Verifies that the test source can compile from source to dex file.
diff --git a/jack-tests/tests/com/android/jack/ifstatement/IfstatementTests.java b/jack-tests/tests/com/android/jack/ifstatement/IfstatementTests.java
index d831f17..0405a75 100644
--- a/jack-tests/tests/com/android/jack/ifstatement/IfstatementTests.java
+++ b/jack-tests/tests/com/android/jack/ifstatement/IfstatementTests.java
@@ -44,10 +44,7 @@ public class IfstatementTests extends RuntimeTest {
AbstractTestTools.getTestRootDir("com.android.jack.ifstatement.simpleTest"),
"com.android.jack.ifstatement.simpleTest.dx.Tests");
- @BeforeClass
- public static void setUpClass() {
- IfstatementTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
@Test
@Category(RuntimeRegressionTest.class)
public void advancedTest() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/imports/ImportTests.java b/jack-tests/tests/com/android/jack/imports/ImportTests.java
index f7ced7e..97c5528 100644
--- a/jack-tests/tests/com/android/jack/imports/ImportTests.java
+++ b/jack-tests/tests/com/android/jack/imports/ImportTests.java
@@ -35,10 +35,7 @@ import java.io.File;
public class ImportTests {
- @BeforeClass
- public static void setUpClass() {
- ImportTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
@Test
public void testCompileNonConflictingSourceAndImport() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/init/InitTests.java b/jack-tests/tests/com/android/jack/init/InitTests.java
index 72b1c63..685d48d 100644
--- a/jack-tests/tests/com/android/jack/init/InitTests.java
+++ b/jack-tests/tests/com/android/jack/init/InitTests.java
@@ -33,10 +33,7 @@ public class InitTests extends RuntimeTest {
AbstractTestTools.getTestRootDir("com.android.jack.init.test002"),
"com.android.jack.init.test002.dx.Tests");
- @BeforeClass
- public static void setUpClass() {
- InitTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
@Test
public void test001() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/inner/InnerTests.java b/jack-tests/tests/com/android/jack/inner/InnerTests.java
index 8230232..710f271 100644
--- a/jack-tests/tests/com/android/jack/inner/InnerTests.java
+++ b/jack-tests/tests/com/android/jack/inner/InnerTests.java
@@ -135,10 +135,7 @@ public class InnerTests extends RuntimeTest {
AbstractTestTools.getTestRootDir("com.android.jack.inner.test026"),
"com.android.jack.inner.test026.dx.Tests");
- @BeforeClass
- public static void setUpClass() {
- InnerTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
@Test
@Category(RuntimeRegressionTest.class)
public void test001() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/instance/InstanceTest.java b/jack-tests/tests/com/android/jack/instance/InstanceTest.java
index 345cac4..b1a6f2b 100644
--- a/jack-tests/tests/com/android/jack/instance/InstanceTest.java
+++ b/jack-tests/tests/com/android/jack/instance/InstanceTest.java
@@ -28,7 +28,7 @@ public class InstanceTest {
@Before
public void setUp() throws Exception {
- InstanceTest.class.getClassLoader().setDefaultAssertionStatus(true);
+
}
@Test
diff --git a/jack-tests/tests/com/android/jack/invoke/InvokeTests.java b/jack-tests/tests/com/android/jack/invoke/InvokeTests.java
index 1db4e57..219249e 100644
--- a/jack-tests/tests/com/android/jack/invoke/InvokeTests.java
+++ b/jack-tests/tests/com/android/jack/invoke/InvokeTests.java
@@ -56,10 +56,7 @@ public class InvokeTests extends RuntimeTest {
AbstractTestTools.getTestRootDir("com.android.jack.invoke.test007"),
"com.android.jack.invoke.test007.dx.Tests");
- @BeforeClass
- public static void setUpClass() {
- InvokeTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
@Test
@Category(RuntimeRegressionTest.class)
public void test001() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/jarjar/JarjarTests.java b/jack-tests/tests/com/android/jack/jarjar/JarjarTests.java
index ed58f65..cfbefa6 100644
--- a/jack-tests/tests/com/android/jack/jarjar/JarjarTests.java
+++ b/jack-tests/tests/com/android/jack/jarjar/JarjarTests.java
@@ -49,7 +49,7 @@ public class JarjarTests {
@Before
public void setUp() {
- JarjarTests.class.getClassLoader().setDefaultAssertionStatus(true);
+
}
@Test
diff --git a/jack-tests/tests/com/android/jack/java7/BoxingTest.java b/jack-tests/tests/com/android/jack/java7/BoxingTest.java
index e842be1..6885383 100644
--- a/jack-tests/tests/com/android/jack/java7/BoxingTest.java
+++ b/jack-tests/tests/com/android/jack/java7/BoxingTest.java
@@ -29,10 +29,7 @@ import org.junit.Test;
*/
public class BoxingTest {
- @BeforeClass
- public static void setUpClass() {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
@Test
public void java7Boxing001() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/java7/ExceptionsTest.java b/jack-tests/tests/com/android/jack/java7/ExceptionsTest.java
index ac8dd36..06ac0ca 100644
--- a/jack-tests/tests/com/android/jack/java7/ExceptionsTest.java
+++ b/jack-tests/tests/com/android/jack/java7/ExceptionsTest.java
@@ -33,10 +33,7 @@ import javax.annotation.Nonnull;
*/
public class ExceptionsTest {
- @BeforeClass
- public static void setUpClass() {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
@Test
public void java7Exception001() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/java7/SwitchesTest.java b/jack-tests/tests/com/android/jack/java7/SwitchesTest.java
index 9dd9fbc..c1931b3 100644
--- a/jack-tests/tests/com/android/jack/java7/SwitchesTest.java
+++ b/jack-tests/tests/com/android/jack/java7/SwitchesTest.java
@@ -33,10 +33,7 @@ import javax.annotation.Nonnull;
*/
public class SwitchesTest {
- @BeforeClass
- public static void setUpClass() {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
@Test
public void java7Switches001() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/java7/TryWithResourcesTests.java b/jack-tests/tests/com/android/jack/java7/TryWithResourcesTests.java
index b2f9c0e..1636280 100644
--- a/jack-tests/tests/com/android/jack/java7/TryWithResourcesTests.java
+++ b/jack-tests/tests/com/android/jack/java7/TryWithResourcesTests.java
@@ -28,10 +28,7 @@ import org.junit.Test;
*/
public class TryWithResourcesTests {
- @BeforeClass
- public static void setUpClass() {
- TryWithResourcesTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
/**
* Verifies that the test source can compiled from source to dex file.
diff --git a/jack-tests/tests/com/android/jack/label/LabelTest.java b/jack-tests/tests/com/android/jack/label/LabelTest.java
index 5abd580..c55c489 100644
--- a/jack-tests/tests/com/android/jack/label/LabelTest.java
+++ b/jack-tests/tests/com/android/jack/label/LabelTest.java
@@ -28,7 +28,7 @@ public class LabelTest {
@Before
public void setUp() throws Exception {
- LabelTest.class.getClassLoader().setDefaultAssertionStatus(true);
+
}
@Test
diff --git a/jack-tests/tests/com/android/jack/library/LibraryTests.java b/jack-tests/tests/com/android/jack/library/LibraryTests.java
index c482827..fb3b760 100644
--- a/jack-tests/tests/com/android/jack/library/LibraryTests.java
+++ b/jack-tests/tests/com/android/jack/library/LibraryTests.java
@@ -44,10 +44,7 @@ import java.util.List;
import javax.annotation.Nonnull;
public class LibraryTests {
- @BeforeClass
- public static void setUpClass() {
- LibraryTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
@Test
public void testEmptyLibraryInClassPath() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/multidex/MultiDexTests.java b/jack-tests/tests/com/android/jack/multidex/MultiDexTests.java
index faeb871..8c23688 100644
--- a/jack-tests/tests/com/android/jack/multidex/MultiDexTests.java
+++ b/jack-tests/tests/com/android/jack/multidex/MultiDexTests.java
@@ -78,7 +78,7 @@ public class MultiDexTests {
@BeforeClass
public static void init() throws IOException, Exception {
- MultiDexTests.class.getClassLoader().setDefaultAssertionStatus(true);
+
annotations = prepareAnnotations();
diff --git a/jack-tests/tests/com/android/jack/newarray/NewarrayTests.java b/jack-tests/tests/com/android/jack/newarray/NewarrayTests.java
index 94f8497..4aff3bc 100644
--- a/jack-tests/tests/com/android/jack/newarray/NewarrayTests.java
+++ b/jack-tests/tests/com/android/jack/newarray/NewarrayTests.java
@@ -48,10 +48,7 @@ public class NewarrayTests extends RuntimeTest {
AbstractTestTools.getTestRootDir("com.android.jack.newarray.test005"),
"com.android.jack.newarray.test005.dx.Tests");
- @BeforeClass
- public static void setUpClass() {
- NewarrayTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
@Test
@Category(RuntimeRegressionTest.class)
public void test001() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/nopackage/NoPackageTests.java b/jack-tests/tests/com/android/jack/nopackage/NoPackageTests.java
index db2cd23..855f96f 100644
--- a/jack-tests/tests/com/android/jack/nopackage/NoPackageTests.java
+++ b/jack-tests/tests/com/android/jack/nopackage/NoPackageTests.java
@@ -26,10 +26,7 @@ import java.io.File;
public class NoPackageTests {
- @BeforeClass
- public static void setUpClass() {
- NoPackageTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
@Test
public void test001() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/opcodes/OpcodesTests.java b/jack-tests/tests/com/android/jack/opcodes/OpcodesTests.java
index 3e66003..6082155 100644
--- a/jack-tests/tests/com/android/jack/opcodes/OpcodesTests.java
+++ b/jack-tests/tests/com/android/jack/opcodes/OpcodesTests.java
@@ -575,10 +575,7 @@ public class OpcodesTests extends RuntimeTest {
"com.android.jack.opcodes.rem_float.Test_rem_float");
- @BeforeClass
- public static void setUpClass() {
- OpcodesTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
@Test
@Category(RuntimeRegressionTest.class)
public void invoke_static() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/optimizations/exprsimplifier/ExprsimplifierTests.java b/jack-tests/tests/com/android/jack/optimizations/exprsimplifier/ExprsimplifierTests.java
index 2534c3c..9068b68 100644
--- a/jack-tests/tests/com/android/jack/optimizations/exprsimplifier/ExprsimplifierTests.java
+++ b/jack-tests/tests/com/android/jack/optimizations/exprsimplifier/ExprsimplifierTests.java
@@ -32,10 +32,7 @@ public class ExprsimplifierTests extends RuntimeTest {
AbstractTestTools.getTestRootDir("com.android.jack.optimizations.exprsimplifier.test001"),
"com.android.jack.optimizations.exprsimplifier.test001.dx.Tests");
- @BeforeClass
- public static void setUpClass() {
- ExprsimplifierTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
@Test
@Category(RuntimeRegressionTest.class)
public void test001() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/optimizations/notsimplifier/NotsimplifierTests.java b/jack-tests/tests/com/android/jack/optimizations/notsimplifier/NotsimplifierTests.java
index 9c55e5e..247486b 100644
--- a/jack-tests/tests/com/android/jack/optimizations/notsimplifier/NotsimplifierTests.java
+++ b/jack-tests/tests/com/android/jack/optimizations/notsimplifier/NotsimplifierTests.java
@@ -36,10 +36,7 @@ public class NotsimplifierTests extends RuntimeTest {
AbstractTestTools.getTestRootDir("com.android.jack.optimizations.notsimplifier.test002"),
"com.android.jack.optimizations.notsimplifier.test002.dx.Tests");
- @BeforeClass
- public static void setUpClass() {
- NotsimplifierTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
@Test
@Category(RuntimeRegressionTest.class)
diff --git a/jack-tests/tests/com/android/jack/order/OrderTests.java b/jack-tests/tests/com/android/jack/order/OrderTests.java
index c62c800..7968599 100644
--- a/jack-tests/tests/com/android/jack/order/OrderTests.java
+++ b/jack-tests/tests/com/android/jack/order/OrderTests.java
@@ -32,10 +32,7 @@ public class OrderTests extends RuntimeTest {
AbstractTestTools.getTestRootDir("com.android.jack.order.test001"),
"com.android.jack.order.test001.dx.Tests");
- @BeforeClass
- public static void setUpClass() {
- OrderTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
@Test
@Category(RuntimeRegressionTest.class)
public void test001() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/preprocessor/PreProcessorTests.java b/jack-tests/tests/com/android/jack/preprocessor/PreProcessorTests.java
index 9453b5d..a719b8f 100644
--- a/jack-tests/tests/com/android/jack/preprocessor/PreProcessorTests.java
+++ b/jack-tests/tests/com/android/jack/preprocessor/PreProcessorTests.java
@@ -46,7 +46,7 @@ public class PreProcessorTests {
@BeforeClass
public static void setUpClass() throws Exception {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
+
}
@Test
diff --git a/jack-tests/tests/com/android/jack/resource/ResourceTests.java b/jack-tests/tests/com/android/jack/resource/ResourceTests.java
index edac93e..8e8bcab 100644
--- a/jack-tests/tests/com/android/jack/resource/ResourceTests.java
+++ b/jack-tests/tests/com/android/jack/resource/ResourceTests.java
@@ -70,10 +70,7 @@ public class ResourceTests {
private static final File FILE =
AbstractTestTools.getTestRootDir("com.android.jack.resource.test001.jack");
- @BeforeClass
- public static void setUpClass() {
- ResourceTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
@Test
public void testJackArchiveToDexDir() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/returnstatement/ReturnstatementTests.java b/jack-tests/tests/com/android/jack/returnstatement/ReturnstatementTests.java
index 66c8792..9c78ece 100644
--- a/jack-tests/tests/com/android/jack/returnstatement/ReturnstatementTests.java
+++ b/jack-tests/tests/com/android/jack/returnstatement/ReturnstatementTests.java
@@ -39,10 +39,7 @@ public class ReturnstatementTests extends RuntimeTest {
AbstractTestTools.getTestRootDir("com.android.jack.returnstatement.returnvoid"),
"com.android.jack.returnstatement.returnvoid.dx.Tests");
- @BeforeClass
- public static void setUpClass() {
- ReturnstatementTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
@Test
@Category(RuntimeRegressionTest.class)
public void returns() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/shrob/AbstractTest.java b/jack-tests/tests/com/android/jack/shrob/AbstractTest.java
index 06e2456..0bab37c 100644
--- a/jack-tests/tests/com/android/jack/shrob/AbstractTest.java
+++ b/jack-tests/tests/com/android/jack/shrob/AbstractTest.java
@@ -48,10 +48,7 @@ public abstract class AbstractTest {
@Nonnull
private static final Charset charSet = Charset.forName("UTF-8");
- @BeforeClass
- public static void setUpClass() {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
protected abstract void runTest(
@Nonnull String testNumber,
diff --git a/jack-tests/tests/com/android/jack/shrob/ShrinkMultiDexTests.java b/jack-tests/tests/com/android/jack/shrob/ShrinkMultiDexTests.java
index 236a268..efa0a0f 100644
--- a/jack-tests/tests/com/android/jack/shrob/ShrinkMultiDexTests.java
+++ b/jack-tests/tests/com/android/jack/shrob/ShrinkMultiDexTests.java
@@ -49,10 +49,7 @@ public class ShrinkMultiDexTests extends AbstractTest {
private static ProguardFlags dontObfuscateFlagFile =
new ProguardFlags(shrobTestsDir, "dontobfuscate.flags");
- @BeforeClass
- public static void setUpClass() {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
@Override
protected void runTest(
diff --git a/jack-tests/tests/com/android/jack/shrob/ShrinkTests.java b/jack-tests/tests/com/android/jack/shrob/ShrinkTests.java
index c73ecdb..e0a40a2 100644
--- a/jack-tests/tests/com/android/jack/shrob/ShrinkTests.java
+++ b/jack-tests/tests/com/android/jack/shrob/ShrinkTests.java
@@ -45,10 +45,7 @@ public class ShrinkTests extends AbstractTest {
private static ProguardFlags dontObfuscateFlagFile =
new ProguardFlags(shrobTestsDir, "dontobfuscate.flags");
- @BeforeClass
- public static void setUpClass() {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
@Override
protected void runTest(
diff --git a/jack-tests/tests/com/android/jack/string/StringTests.java b/jack-tests/tests/com/android/jack/string/StringTests.java
index ed919d6..764e733 100644
--- a/jack-tests/tests/com/android/jack/string/StringTests.java
+++ b/jack-tests/tests/com/android/jack/string/StringTests.java
@@ -43,10 +43,7 @@ public class StringTests extends RuntimeTest {
AbstractTestTools.getTestRootDir("com.android.jack.string.concat003"),
"com.android.jack.string.concat003.dx.Tests");
- @BeforeClass
- public static void setUpClass() {
- StringTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
@Test
public void testCompileNewString() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/switchstatement/SwitchstatementTests.java b/jack-tests/tests/com/android/jack/switchstatement/SwitchstatementTests.java
index 59eed09..bc83959 100644
--- a/jack-tests/tests/com/android/jack/switchstatement/SwitchstatementTests.java
+++ b/jack-tests/tests/com/android/jack/switchstatement/SwitchstatementTests.java
@@ -81,10 +81,7 @@ public class SwitchstatementTests extends RuntimeTest {
AbstractTestTools.getTestRootDir("com.android.jack.switchstatement.test011"),
"com.android.jack.switchstatement.test011.dx.Tests");
- @BeforeClass
- public static void setUpClass() {
- SwitchstatementTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
@Test
@Category(RuntimeRegressionTest.class)
public void test001() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/synchronize/SynchronizeTests.java b/jack-tests/tests/com/android/jack/synchronize/SynchronizeTests.java
index 0ee6ed8..ff779c8 100644
--- a/jack-tests/tests/com/android/jack/synchronize/SynchronizeTests.java
+++ b/jack-tests/tests/com/android/jack/synchronize/SynchronizeTests.java
@@ -32,10 +32,7 @@ public class SynchronizeTests extends RuntimeTest {
AbstractTestTools.getTestRootDir("com.android.jack.synchronize.test001"),
"com.android.jack.synchronize.test001.dx.Tests");
- @BeforeClass
- public static void setUpClass() {
- SynchronizeTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
@Test
@Category(RuntimeRegressionTest.class)
public void test001() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/threeaddress/ThreeaddressTests.java b/jack-tests/tests/com/android/jack/threeaddress/ThreeaddressTests.java
index 6a172eb..6fd7176 100644
--- a/jack-tests/tests/com/android/jack/threeaddress/ThreeaddressTests.java
+++ b/jack-tests/tests/com/android/jack/threeaddress/ThreeaddressTests.java
@@ -32,10 +32,7 @@ public class ThreeaddressTests extends RuntimeTest {
AbstractTestTools.getTestRootDir("com.android.jack.threeaddress.test001"),
"com.android.jack.threeaddress.test001.dx.Tests");
- @BeforeClass
- public static void setUpClass() {
- ThreeaddressTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
@Test
@Category(RuntimeRegressionTest.class)
public void test001() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/throwstatement/ThrowstatementTests.java b/jack-tests/tests/com/android/jack/throwstatement/ThrowstatementTests.java
index 21c277f..5db8fbf 100644
--- a/jack-tests/tests/com/android/jack/throwstatement/ThrowstatementTests.java
+++ b/jack-tests/tests/com/android/jack/throwstatement/ThrowstatementTests.java
@@ -36,10 +36,7 @@ public class ThrowstatementTests extends RuntimeTest {
AbstractTestTools.getTestRootDir("com.android.jack.throwstatement.test002"),
"com.android.jack.throwstatement.test002.dx.Tests");
- @BeforeClass
- public static void setUpClass() {
- ThrowstatementTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
@Test
@Category(RuntimeRegressionTest.class)
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 558badf..d6c21ed 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
@@ -55,10 +55,7 @@ public class MergerTest011 extends MergerTestTools {
"Error during the dex writing phase: classes.dex has too many IDs. Try using multi-dex";
- @BeforeClass
- public static void setUpClass() {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
@Test
public void testMergerWithHighNumberOfMethods() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/trycatch/TrycatchTests.java b/jack-tests/tests/com/android/jack/trycatch/TrycatchTests.java
index 8fcac89..c22d174 100644
--- a/jack-tests/tests/com/android/jack/trycatch/TrycatchTests.java
+++ b/jack-tests/tests/com/android/jack/trycatch/TrycatchTests.java
@@ -57,10 +57,7 @@ public class TrycatchTests extends RuntimeTest {
AbstractTestTools.getTestRootDir("com.android.jack.trycatch.test005"),
"com.android.jack.trycatch.test005.dx.Tests");
- @BeforeClass
- public static void setUpClass() {
- TrycatchTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
@Test
@Category(RuntimeRegressionTest.class)
public void test001() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/tryfinally/TryfinallyTests.java b/jack-tests/tests/com/android/jack/tryfinally/TryfinallyTests.java
index 1535706..d5436c1 100644
--- a/jack-tests/tests/com/android/jack/tryfinally/TryfinallyTests.java
+++ b/jack-tests/tests/com/android/jack/tryfinally/TryfinallyTests.java
@@ -44,10 +44,7 @@ public class TryfinallyTests extends RuntimeTest {
AbstractTestTools.getTestRootDir("com.android.jack.tryfinally.finallyblock"),
"com.android.jack.tryfinally.finallyblock.dx.Tests");
- @BeforeClass
- public static void setUpClass() {
- TryfinallyTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
@Test
@Category(RuntimeRegressionTest.class)
public void finally002() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/type/TypeTests.java b/jack-tests/tests/com/android/jack/type/TypeTests.java
index f908532..33cc73c 100644
--- a/jack-tests/tests/com/android/jack/type/TypeTests.java
+++ b/jack-tests/tests/com/android/jack/type/TypeTests.java
@@ -36,10 +36,7 @@ public class TypeTests extends RuntimeTest {
AbstractTestTools.getTestRootDir("com.android.jack.type.test002"),
"com.android.jack.type.test002.dx.Tests");
- @BeforeClass
- public static void setUpClass() {
- TypeTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
@Test
@Category(RuntimeRegressionTest.class)
public void test001() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/unary/UnaryTests.java b/jack-tests/tests/com/android/jack/unary/UnaryTests.java
index 2f1485e..dd2a8c5 100644
--- a/jack-tests/tests/com/android/jack/unary/UnaryTests.java
+++ b/jack-tests/tests/com/android/jack/unary/UnaryTests.java
@@ -44,10 +44,7 @@ public class UnaryTests extends RuntimeTest {
AbstractTestTools.getTestRootDir("com.android.jack.unary.test004"),
"com.android.jack.unary.test004.dx.Tests");
- @BeforeClass
- public static void setUpClass() {
- UnaryTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
@Test
@Category(RuntimeRegressionTest.class)
public void test001() throws Exception {
diff --git a/jack-tests/tests/com/android/jack/verify/VerifyTests.java b/jack-tests/tests/com/android/jack/verify/VerifyTests.java
index 12c0cfb..6885db1 100644
--- a/jack-tests/tests/com/android/jack/verify/VerifyTests.java
+++ b/jack-tests/tests/com/android/jack/verify/VerifyTests.java
@@ -32,10 +32,7 @@ public class VerifyTests extends RuntimeTest {
AbstractTestTools.getTestRootDir("com.android.jack.verify.test001"),
"com.android.jack.verify.test001.dx.Tests");
- @BeforeClass
- public static void setUpClass() {
- VerifyTests.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
@Test
@Category(RuntimeRegressionTest.class)
public void test001() throws Exception {
diff --git a/jack-tests/tests/com/android/sched/SchedTest.java b/jack-tests/tests/com/android/sched/SchedTest.java
index 5a84e0e..02ea831 100644
--- a/jack-tests/tests/com/android/sched/SchedTest.java
+++ b/jack-tests/tests/com/android/sched/SchedTest.java
@@ -32,10 +32,7 @@ public class SchedTest {
private static final File SOURCE = TestTools.getJackUnitTestFromBinaryName("com/android/sched/input/Test");
- @BeforeClass
- public static void setUpClass() {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
- }
+
/**
* Verifies that StaticField.java can compiled from source to dex file.
diff --git a/jack/src/com/android/jack/Jack.java b/jack/src/com/android/jack/Jack.java
index 86c79a7..1a1c247 100644
--- a/jack/src/com/android/jack/Jack.java
+++ b/jack/src/com/android/jack/Jack.java
@@ -373,10 +373,6 @@ public abstract class Jack {
public static void check(@Nonnull Options options, @Nonnull RunnableHooks hooks)
throws IllegalOptionsException, ConfigurationException {
- boolean assertEnable = false;
- // assertEnable = true if assertions are already enabled
- assert true == (assertEnable = true);
-
if (options.proguardFlagsFiles != null && !options.proguardFlagsFiles.isEmpty()) {
if (options.flags == null) {
options.flags = new Flags();
@@ -401,13 +397,7 @@ public abstract class Jack {
ThreadConfig.setConfig(config);
boolean sanityChecks = config.get(Options.SANITY_CHECKS).booleanValue();
- if (sanityChecks != assertEnable) {
- logger.log(Level.INFO, "Jack assertion status overriden by sanity checks option");
- }
- ClassLoader classLoader = Jack.class.getClassLoader();
- classLoader.clearAssertionStatus();
- classLoader.setDefaultAssertionStatus(sanityChecks);
logger.log(Level.INFO, "Jack sanity checks {0}",
(sanityChecks ? "enabled" : "disabled"));
}
diff --git a/jack/tests/com/android/jack/ConditionalTest.java b/jack/tests/com/android/jack/ConditionalTest.java
index 2187f74..c361064 100644
--- a/jack/tests/com/android/jack/ConditionalTest.java
+++ b/jack/tests/com/android/jack/ConditionalTest.java
@@ -41,7 +41,6 @@ import org.junit.Test;
public class ConditionalTest {
@BeforeClass
public static void setUpClass() throws ConfigurationException, IllegalOptionsException {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
Options options = new Options();
RunnableHooks hooks = new RunnableHooks();
options.checkValidity(hooks);
diff --git a/jack/tests/com/android/jack/FibonacciThreeAddressTest.java b/jack/tests/com/android/jack/FibonacciThreeAddressTest.java
index 7f188a5..3cc829e 100644
--- a/jack/tests/com/android/jack/FibonacciThreeAddressTest.java
+++ b/jack/tests/com/android/jack/FibonacciThreeAddressTest.java
@@ -25,7 +25,6 @@ import com.android.jack.scheduling.marker.ClassDefItemMarker;
import junit.framework.Assert;
-import org.junit.BeforeClass;
import org.junit.Test;
import java.io.File;
@@ -40,12 +39,6 @@ public class FibonacciThreeAddressTest {
private static final String JAVA_FILENAME = "FibonacciThreeAddress.java";
private static final File JAVA_FILEPATH = TestTools.getJackTestFromBinaryName(CLASS_BINARY_NAME);
- @BeforeClass
- public static void setUpClass() {
- // Enable assertions
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
- }
-
/**
* Verifies that FibonacciThreeAddress can be loaded in J-AST.
*/
diff --git a/jack/tests/com/android/jack/FinallyTest.java b/jack/tests/com/android/jack/FinallyTest.java
index 7e5af08..8aff858 100644
--- a/jack/tests/com/android/jack/FinallyTest.java
+++ b/jack/tests/com/android/jack/FinallyTest.java
@@ -25,7 +25,6 @@ import com.android.jack.ir.ast.JVisitor;
import junit.framework.Assert;
-import org.junit.BeforeClass;
import org.junit.Test;
import javax.annotation.Nonnull;
@@ -35,11 +34,6 @@ import javax.annotation.Nonnull;
*/
public class FinallyTest {
- @BeforeClass
- public static void setUpClass() {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
- }
-
@Test
public void testCompile005() throws Exception {
String classBinaryName = "com/android/jack/tryfinally/finally005/jack/Finally005";
diff --git a/jack/tests/com/android/jack/JarjarTest.java b/jack/tests/com/android/jack/JarjarTest.java
index 0ca1b4c..fc8a400 100644
--- a/jack/tests/com/android/jack/JarjarTest.java
+++ b/jack/tests/com/android/jack/JarjarTest.java
@@ -40,7 +40,6 @@ public class JarjarTest {
@BeforeClass
public static void setUpClass() {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
Rule rule = new Rule();
rule.setPattern("org.**");
rule.setResult("foo.@1");
diff --git a/jack/tests/com/android/jack/MainTest.java b/jack/tests/com/android/jack/MainTest.java
index 0750edf..9056ec3 100644
--- a/jack/tests/com/android/jack/MainTest.java
+++ b/jack/tests/com/android/jack/MainTest.java
@@ -21,7 +21,6 @@ import com.android.jack.ir.ast.JSession;
import junit.framework.Assert;
-import org.junit.BeforeClass;
import org.junit.Test;
/**
@@ -32,12 +31,6 @@ public class MainTest {
private static final String CLASS_BINARY_NAME = "com/android/jack/fibonacci/test001/jack/Fibo";
private static final String CLASS_SIGNATURE = "L" + CLASS_BINARY_NAME + ";";
- @BeforeClass
- public static void setUpClass() {
- // Enable assertions
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
- }
-
/**
* Verifies that Fibo can be loaded in J-AST.
*/
diff --git a/jack/tests/com/android/jack/StaticValuesTest.java b/jack/tests/com/android/jack/StaticValuesTest.java
index 63acb3b..946ce9b 100644
--- a/jack/tests/com/android/jack/StaticValuesTest.java
+++ b/jack/tests/com/android/jack/StaticValuesTest.java
@@ -36,7 +36,6 @@ import com.android.sched.scheduler.TagOrMarkerOrComponentSet;
import junit.framework.Assert;
-import org.junit.BeforeClass;
import org.junit.Test;
import java.util.List;
@@ -48,11 +47,6 @@ public class StaticValuesTest {
private static final String CLINIT = "<clinit>";
- @BeforeClass
- public static void setUpClass() {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
- }
-
@Test
public void testGeneratedClinit1() throws Exception {
Assert.assertTrue(
diff --git a/jack/tests/com/android/jack/TestTools.java b/jack/tests/com/android/jack/TestTools.java
index eb2dc4d..db782f6 100644
--- a/jack/tests/com/android/jack/TestTools.java
+++ b/jack/tests/com/android/jack/TestTools.java
@@ -479,4 +479,12 @@ public class TestTools {
}
throw new AssertionError("Encoded method not found.");
}
+
+ public static boolean areAssertionsEnabled() {
+ boolean assertEnable = false;
+ // assertEnable = true if assertions are already enabled
+ assert true == (assertEnable = true);
+ return assertEnable;
+ }
+
}
diff --git a/jack/tests/com/android/jack/Types.java b/jack/tests/com/android/jack/Types.java
index 74eea17..f48fb72 100644
--- a/jack/tests/com/android/jack/Types.java
+++ b/jack/tests/com/android/jack/Types.java
@@ -47,7 +47,7 @@ import com.android.sched.util.config.ThreadConfig;
import junit.framework.Assert;
-import org.junit.BeforeClass;
+import org.junit.Assume;
import org.junit.Test;
/**
@@ -66,13 +66,10 @@ public class Types {
session.getLookup().getOrCreatePackage("java/lang");
}
- @BeforeClass
- public static void setUpClass() {
- Types.class.getClassLoader().setDefaultAssertionStatus(true);
- }
-
@Test
public void unaryPrefixNotGetType() throws Exception {
+ Assume.assumeTrue(TestTools.areAssertionsEnabled());
+
boolean catched;
try {
@@ -106,6 +103,8 @@ public class Types {
@Test
public void unaryPrefixBitNotGetType() throws Exception {
+ Assume.assumeTrue(TestTools.areAssertionsEnabled());
+
boolean catched;
try {
@@ -211,6 +210,8 @@ public class Types {
@Test
public void shiftGetType() throws Exception {
+ Assume.assumeTrue(TestTools.areAssertionsEnabled());
+
boolean catched;
try {
@@ -294,6 +295,8 @@ public class Types {
@Test
public void relationalGetType() throws Exception {
+ Assume.assumeTrue(TestTools.areAssertionsEnabled());
+
boolean catched;
try {
catched = false;
@@ -345,6 +348,8 @@ public class Types {
@Test
public void logicalAndBitwiseGetType() throws Exception {
+ Assume.assumeTrue(TestTools.areAssertionsEnabled());
+
boolean catched;
try {
catched = false;
@@ -419,6 +424,8 @@ public class Types {
@Test
public void equalityGetType() throws Exception {
+ Assume.assumeTrue(TestTools.areAssertionsEnabled());
+
boolean catched;
Assert.assertEquals(JPrimitiveTypeEnum.BOOLEAN.getType(), new JEqOperation(SourceInfo.UNKNOWN,
@@ -463,6 +470,8 @@ public class Types {
@Test
public void conditionalOperationGetType() throws Exception {
+ Assume.assumeTrue(TestTools.areAssertionsEnabled());
+
boolean catched;
Assert.assertEquals(JPrimitiveTypeEnum.BOOLEAN.getType(), new JAndOperation(SourceInfo.UNKNOWN,
@@ -487,6 +496,8 @@ public class Types {
@Test
public void arithmeticGetType() throws Exception {
+ Assume.assumeTrue(TestTools.areAssertionsEnabled());
+
boolean catched;
JType objectType = Jack.getSession().getPhantomLookup().getClass(CommonTypes.JAVA_LANG_OBJECT);
JLocal l = new JLocal(SourceInfo.UNKNOWN, "test", objectType, JModifier.DEFAULT, null);
diff --git a/jack/tests/com/android/jack/UnaryTest.java b/jack/tests/com/android/jack/UnaryTest.java
index f72342e..07d71be 100644
--- a/jack/tests/com/android/jack/UnaryTest.java
+++ b/jack/tests/com/android/jack/UnaryTest.java
@@ -22,7 +22,6 @@ import com.android.jack.ir.ast.JVisitor;
import junit.framework.Assert;
-import org.junit.BeforeClass;
import org.junit.Test;
import javax.annotation.Nonnull;
@@ -32,11 +31,6 @@ import javax.annotation.Nonnull;
*/
public class UnaryTest {
- @BeforeClass
- public static void setUpClass() {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
- }
-
@Test
public void testCompile5() throws Exception {
String classBinaryName = "com/android/jack/unary/test005/jack/UnaryNot";
diff --git a/jack/tests/com/android/jack/VersionTest.java b/jack/tests/com/android/jack/VersionTest.java
index 8029b7d..73a1336 100644
--- a/jack/tests/com/android/jack/VersionTest.java
+++ b/jack/tests/com/android/jack/VersionTest.java
@@ -19,14 +19,9 @@ package com.android.jack;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
-import org.junit.BeforeClass;
import org.junit.Test;
public class VersionTest {
- @BeforeClass
- public static void setUpClass() {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
- }
@Test
public void testVersion() {
diff --git a/jack/tests/com/android/jack/backend/dex/rop/RopRegisterManagerTest.java b/jack/tests/com/android/jack/backend/dex/rop/RopRegisterManagerTest.java
index 05f3bfc..f7fed5d 100644
--- a/jack/tests/com/android/jack/backend/dex/rop/RopRegisterManagerTest.java
+++ b/jack/tests/com/android/jack/backend/dex/rop/RopRegisterManagerTest.java
@@ -24,16 +24,10 @@ import com.android.jack.ir.sourceinfo.SourceInfo;
import junit.framework.Assert;
-import org.junit.Before;
import org.junit.Test;
public class RopRegisterManagerTest {
- @Before
- public void setUp() throws Exception {
- RopRegisterManagerTest.class.getClassLoader().setDefaultAssertionStatus(true);
- }
-
/**
* Return reg must be created before getting it.
*/
diff --git a/jack/tests/com/android/jack/cfg/BuildCfgErrorTest.java b/jack/tests/com/android/jack/cfg/BuildCfgErrorTest.java
index 68817fb..e440896d 100644
--- a/jack/tests/com/android/jack/cfg/BuildCfgErrorTest.java
+++ b/jack/tests/com/android/jack/cfg/BuildCfgErrorTest.java
@@ -22,18 +22,12 @@ import com.android.jack.TestTools;
import com.android.jack.ir.ast.JMethod;
import com.android.jack.util.graph.GraphException;
-import org.junit.Before;
import org.junit.Test;
public class BuildCfgErrorTest {
private static final String CLASS_BINARY_NAME = "com/android/jack/fibonacci/test001/jack/FibonacciThreeAddress";
- @Before
- public void setUp() throws Exception {
- BuildCfgErrorTest.class.getClassLoader().setDefaultAssertionStatus(true);
- }
-
/**
* Add a successor twice to a block is not allow.
* @throws Exception
diff --git a/jack/tests/com/android/jack/cfg/BuildCfgTest.java b/jack/tests/com/android/jack/cfg/BuildCfgTest.java
index 07415de..56cd375 100644
--- a/jack/tests/com/android/jack/cfg/BuildCfgTest.java
+++ b/jack/tests/com/android/jack/cfg/BuildCfgTest.java
@@ -41,8 +41,6 @@ public class BuildCfgTest {
@Before
public void setUp() throws Exception {
- BuildCfgTest.class.getClassLoader().setDefaultAssertionStatus(true);
-
String classSignature = "L" + CLASS_BINARY_NAME + ";";
File fileName = TestTools.getJackTestFromBinaryName(CLASS_BINARY_NAME);
final String methodSignature = "fibonacci(I)I";
diff --git a/jack/tests/com/android/jack/frontend/ArrayTest.java b/jack/tests/com/android/jack/frontend/ArrayTest.java
index fe722a1..8a9e021 100644
--- a/jack/tests/com/android/jack/frontend/ArrayTest.java
+++ b/jack/tests/com/android/jack/frontend/ArrayTest.java
@@ -19,16 +19,10 @@ package com.android.jack.frontend;
import com.android.jack.TestTools;
-import org.junit.Before;
import org.junit.Test;
public class ArrayTest {
- @Before
- public void setUp() throws Exception {
- ArrayTest.class.getClassLoader().setDefaultAssertionStatus(true);
- }
-
@Test
public void arrayReuse() throws Exception {
String binaryName = "com/android/jack/newarray/test003/jack/ArrayReuse";
diff --git a/jack/tests/com/android/jack/frontend/ClinitTest.java b/jack/tests/com/android/jack/frontend/ClinitTest.java
index f66a8df..028e3d6 100644
--- a/jack/tests/com/android/jack/frontend/ClinitTest.java
+++ b/jack/tests/com/android/jack/frontend/ClinitTest.java
@@ -16,7 +16,6 @@
package com.android.jack.frontend;
-import com.android.jack.Main;
import com.android.jack.TestTools;
import com.android.jack.ir.ast.JAsgOperation;
import com.android.jack.ir.ast.JBlock;
@@ -28,7 +27,6 @@ import com.android.jack.util.NamingTools;
import junit.framework.Assert;
-import org.junit.Before;
import org.junit.Test;
import java.util.List;
@@ -40,11 +38,6 @@ public class ClinitTest {
public static final String CLASS_BINARY_NAME
= "com/android/jack/clinit/jack/ClInit";
- @Before
- public void setUp() throws Exception {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
- }
-
@Test
public void searchStaticInit() throws Exception {
JMethod clinit = TestTools.getJMethodWithRejectAllFilter(
diff --git a/jack/tests/com/android/jack/frontend/ConstantReuseTest.java b/jack/tests/com/android/jack/frontend/ConstantReuseTest.java
index 3253449..efb36df 100644
--- a/jack/tests/com/android/jack/frontend/ConstantReuseTest.java
+++ b/jack/tests/com/android/jack/frontend/ConstantReuseTest.java
@@ -19,7 +19,6 @@ package com.android.jack.frontend;
import com.android.jack.TestTools;
-import org.junit.Before;
import org.junit.Test;
import java.io.File;
@@ -30,10 +29,6 @@ public class ConstantReuseTest {
private static String CLASS_SIGNATURE = "L" + CLASS_BINARY_NAME + ";";
private static File TEST_FILE = TestTools.getJackTestFromBinaryName(CLASS_BINARY_NAME);
- @Before
- public void setUp() throws Exception {
- ConstantReuseTest.class.getClassLoader().setDefaultAssertionStatus(true);
- }
@Test
public void intConstantReuse() throws Exception {
diff --git a/jack/tests/com/android/jack/frontend/FieldModifierTest.java b/jack/tests/com/android/jack/frontend/FieldModifierTest.java
index e8d4427..b369614 100644
--- a/jack/tests/com/android/jack/frontend/FieldModifierTest.java
+++ b/jack/tests/com/android/jack/frontend/FieldModifierTest.java
@@ -40,8 +40,6 @@ public class FieldModifierTest {
@Before
public void setUp() throws Exception {
- FieldModifierTest.class.getClassLoader().setDefaultAssertionStatus(true);
-
Options jackArgs =
TestTools.buildCommandLineArgs(TestTools
.getJackTestFromBinaryName(FIELD_MODIFIER_BINARY_NAME));
diff --git a/jack/tests/com/android/jack/frontend/GotoTest.java b/jack/tests/com/android/jack/frontend/GotoTest.java
index 2bedb5b..559cda0 100644
--- a/jack/tests/com/android/jack/frontend/GotoTest.java
+++ b/jack/tests/com/android/jack/frontend/GotoTest.java
@@ -30,7 +30,7 @@ import com.android.jack.ir.sourceinfo.SourceInfo;
import junit.framework.Assert;
import junit.framework.AssertionFailedError;
-import org.junit.Before;
+import org.junit.Assume;
import org.junit.Test;
import java.util.List;
@@ -38,13 +38,11 @@ import java.util.List;
public class GotoTest {
private static final String TEST_CLASS_BINARY_NAME = "com/android/jack/frontend/SynthetizeCode";
- @Before
- public void setUp() throws Exception {
- GotoTest.class.getClassLoader().setDefaultAssertionStatus(true);
- }
-
@Test
public void dumpGoto() throws Exception {
+
+ Assume.assumeTrue(TestTools.areAssertionsEnabled());
+
JMethod dumpGoto = TestTools.getJMethodWithRejectAllFilter(
TestTools.getJackUnitTestFromBinaryName(TEST_CLASS_BINARY_NAME),
"L" + TEST_CLASS_BINARY_NAME + ";", "synthetizeCode()V");
diff --git a/jack/tests/com/android/jack/frontend/InitTest.java b/jack/tests/com/android/jack/frontend/InitTest.java
index db60fbb..8d7dd6c 100644
--- a/jack/tests/com/android/jack/frontend/InitTest.java
+++ b/jack/tests/com/android/jack/frontend/InitTest.java
@@ -22,16 +22,10 @@ import com.android.jack.util.NamingTools;
import junit.framework.Assert;
-import org.junit.Before;
import org.junit.Test;
public class InitTest {
- @Before
- public void setUp() throws Exception {
- ConstantReuseTest.class.getClassLoader().setDefaultAssertionStatus(true);
- }
-
@Test
public void searchInit() throws Exception {
String binaryName = "com/android/jack/fibonacci/test001/jack/Fibo";
diff --git a/jack/tests/com/android/jack/frontend/MethodModifierTest.java b/jack/tests/com/android/jack/frontend/MethodModifierTest.java
index c0e1d22..cabb893 100644
--- a/jack/tests/com/android/jack/frontend/MethodModifierTest.java
+++ b/jack/tests/com/android/jack/frontend/MethodModifierTest.java
@@ -38,8 +38,6 @@ public class MethodModifierTest {
@Before
public void setUp() throws Exception {
- MethodModifierTest.class.getClassLoader().setDefaultAssertionStatus(true);
-
Options jackArgs = TestTools.buildCommandLineArgs(
TestTools.getJackTestFromBinaryName(classBinaryName));
jackArgs.addProperty(Options.METHOD_FILTER.getName(), "reject-all-methods");
diff --git a/jack/tests/com/android/jack/frontend/SwitchTest.java b/jack/tests/com/android/jack/frontend/SwitchTest.java
index d4598af..8c3fbc5 100644
--- a/jack/tests/com/android/jack/frontend/SwitchTest.java
+++ b/jack/tests/com/android/jack/frontend/SwitchTest.java
@@ -27,7 +27,6 @@ import com.android.jack.util.filter.SignatureMethodFilter;
import junit.framework.Assert;
-import org.junit.Before;
import org.junit.Test;
import java.io.File;
@@ -44,11 +43,6 @@ public class SwitchTest {
@Nonnull
private static final File FILE = TestTools.getJackTestFromBinaryName(CLASS_BINARY_NAME);
- @Before
- public void setUp() throws Exception {
- SwitchTest.class.getClassLoader().setDefaultAssertionStatus(true);
- }
-
@Test
public void testCompileSwitch001() throws Exception {
final String methodSignature = "switch001(I)I";
diff --git a/jack/tests/com/android/jack/frontend/SynchronizedTest.java b/jack/tests/com/android/jack/frontend/SynchronizedTest.java
index 9d27177..0b50034 100644
--- a/jack/tests/com/android/jack/frontend/SynchronizedTest.java
+++ b/jack/tests/com/android/jack/frontend/SynchronizedTest.java
@@ -36,7 +36,6 @@ import com.android.jack.util.filter.SignatureMethodFilter;
import junit.framework.Assert;
-import org.junit.Before;
import org.junit.Test;
import java.io.File;
@@ -52,11 +51,6 @@ public class SynchronizedTest {
@Nonnull
private static final File FILE = TestTools.getJackTestFromBinaryName(CLASS_BINARY_NAME);
- @Before
- public void setUp() throws Exception {
- SynchronizedTest.class.getClassLoader().setDefaultAssertionStatus(true);
- }
-
@Test
public void testSynchronizedBlock() throws Exception {
final String methodSignature = "sync(I)I";
diff --git a/jack/tests/com/android/jack/frontend/TypeModifierTest.java b/jack/tests/com/android/jack/frontend/TypeModifierTest.java
index 78a3084..9be7154 100644
--- a/jack/tests/com/android/jack/frontend/TypeModifierTest.java
+++ b/jack/tests/com/android/jack/frontend/TypeModifierTest.java
@@ -34,8 +34,6 @@ public class TypeModifierTest {
@Before
public void setUp() throws Exception {
- TypeModifierTest.class.getClassLoader().setDefaultAssertionStatus(true);
-
Options jackArgs = TestTools.buildCommandLineArgs(
TestTools.getJackTestFromBinaryName(OUTER_CLASS_BINARY_NAME));
jackArgs.addProperty(Options.METHOD_FILTER.getName(), "reject-all-methods");
diff --git a/jack/tests/com/android/jack/gwt/BaseGenerationTest.java b/jack/tests/com/android/jack/gwt/BaseGenerationTest.java
index 4a336ce..f97cac8 100644
--- a/jack/tests/com/android/jack/gwt/BaseGenerationTest.java
+++ b/jack/tests/com/android/jack/gwt/BaseGenerationTest.java
@@ -16,7 +16,6 @@
package com.android.jack.gwt;
-import com.android.jack.Main;
import com.android.jack.ir.ast.JAbsentArrayDimension;
import com.android.jack.ir.ast.JArrayType;
import com.android.jack.ir.ast.JExpression;
@@ -29,7 +28,6 @@ import com.android.jack.util.DefaultTextOutput;
import junit.framework.Assert;
-import org.junit.BeforeClass;
import org.junit.Test;
import java.util.ArrayList;
@@ -37,11 +35,6 @@ import java.util.List;
public class BaseGenerationTest {
- @BeforeClass
- public static void setUpClass() throws Exception {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
- }
-
@Test
public void toStringNewArray001() {
List<JExpression> dims = new ArrayList<JExpression>();
diff --git a/jack/tests/com/android/jack/gwt/BinaryLookup.java b/jack/tests/com/android/jack/gwt/BinaryLookup.java
index 5eda472..b68699c 100644
--- a/jack/tests/com/android/jack/gwt/BinaryLookup.java
+++ b/jack/tests/com/android/jack/gwt/BinaryLookup.java
@@ -17,7 +17,6 @@
package com.android.jack.gwt;
import com.android.jack.Jack;
-import com.android.jack.Main;
import com.android.jack.Options;
import com.android.jack.TestTools;
import com.android.jack.ir.ast.JConstructor;
@@ -37,6 +36,7 @@ import com.android.sched.util.RunnableHooks;
import junit.framework.Assert;
import org.junit.AfterClass;
+import org.junit.Assume;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -48,8 +48,6 @@ public class BinaryLookup {
@BeforeClass
public static void setUpClass() throws Exception {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
-
Options fiboArgs = TestTools.buildCommandLineArgs(
TestTools.getJackTestFromBinaryName("com/android/jack/fibonacci/test001/jack/Fibo"));
fiboArgs.addProperty(Options.METHOD_FILTER.getName(), "reject-all-methods");
@@ -98,6 +96,8 @@ public class BinaryLookup {
@Test
public void lookupJavaLangStringError2() throws JTypeLookupException {
+ Assume.assumeTrue(TestTools.areAssertionsEnabled());
+
boolean fail = false;
try {
lookup.getType("java/lang/String;");
@@ -111,6 +111,8 @@ public class BinaryLookup {
@Test
public void lookupTypeError1() throws JTypeLookupException {
+ Assume.assumeTrue(TestTools.areAssertionsEnabled());
+
boolean fail = false;
try {
lookup.getType("L;");
@@ -124,6 +126,8 @@ public class BinaryLookup {
@Test
public void lookupTypeError2() throws JTypeLookupException {
+ Assume.assumeTrue(TestTools.areAssertionsEnabled());
+
boolean fail = false;
try {
lookup.getType("");
@@ -137,6 +141,8 @@ public class BinaryLookup {
@Test
public void lookupTypeError3() throws JTypeLookupException {
+ Assume.assumeTrue(TestTools.areAssertionsEnabled());
+
boolean fail = false;
try {
lookup.getType("L/C;");
@@ -150,6 +156,8 @@ public class BinaryLookup {
@Test
public void lookupTypeError4() throws JTypeLookupException {
+ Assume.assumeTrue(TestTools.areAssertionsEnabled());
+
boolean fail = false;
try {
lookup.getType("Lp/;");
@@ -163,6 +171,8 @@ public class BinaryLookup {
@Test
public void lookupTypeError5() throws JTypeLookupException {
+ Assume.assumeTrue(TestTools.areAssertionsEnabled());
+
boolean fail = false;
try {
lookup.getType("E");
@@ -176,6 +186,8 @@ public class BinaryLookup {
@Test
public void lookupArrayError1() throws JTypeLookupException {
+ Assume.assumeTrue(TestTools.areAssertionsEnabled());
+
boolean fail = false;
try {
lookup.getType("[[[[");
diff --git a/jack/tests/com/android/jack/ir/ast/MarkerCollectorTest.java b/jack/tests/com/android/jack/ir/ast/MarkerCollectorTest.java
index 06f35ea..5bce10e 100644
--- a/jack/tests/com/android/jack/ir/ast/MarkerCollectorTest.java
+++ b/jack/tests/com/android/jack/ir/ast/MarkerCollectorTest.java
@@ -50,7 +50,6 @@ public class MarkerCollectorTest {
@BeforeClass
public static void setUp() throws Exception {
- MarkerCollectorTest.class.getClassLoader().setDefaultAssertionStatus(true);
Options options = new Options();
RunnableHooks hooks = new RunnableHooks();
options.checkValidity(hooks);
diff --git a/jack/tests/com/android/jack/ir/impl/ReferenceMapperTest.java b/jack/tests/com/android/jack/ir/impl/ReferenceMapperTest.java
index 0caf341..da2ac84 100644
--- a/jack/tests/com/android/jack/ir/impl/ReferenceMapperTest.java
+++ b/jack/tests/com/android/jack/ir/impl/ReferenceMapperTest.java
@@ -16,11 +16,8 @@
package com.android.jack.ir.impl;
-import com.android.jack.Main;
-
import junit.framework.Assert;
-import org.junit.BeforeClass;
import org.junit.Test;
/**
@@ -28,12 +25,6 @@ import org.junit.Test;
*/
public class ReferenceMapperTest {
- @BeforeClass
- public static void setUpClass() {
- // Enable assertions
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
- }
-
private static final String[] TYPES =
{ "Z", "B", "C", "S", "I", "J", "F", "D", "Ljava/lang/Object;" };
diff --git a/jack/tests/com/android/jack/optimizations/ExpressionSimplifierTest.java b/jack/tests/com/android/jack/optimizations/ExpressionSimplifierTest.java
index 44af485..0632f5a 100644
--- a/jack/tests/com/android/jack/optimizations/ExpressionSimplifierTest.java
+++ b/jack/tests/com/android/jack/optimizations/ExpressionSimplifierTest.java
@@ -89,7 +89,6 @@ public class ExpressionSimplifierTest {
}
@BeforeClass
public static void setUp() throws Exception {
- ExpressionSimplifierTest.class.getClassLoader().setDefaultAssertionStatus(true);
Options options = new Options();
RunnableHooks hooks = new RunnableHooks();
options.checkValidity(hooks);
diff --git a/jack/tests/com/android/jack/preprocessor/PreProcessorTest.java b/jack/tests/com/android/jack/preprocessor/PreProcessorTest.java
index cb38d2a..098463e 100644
--- a/jack/tests/com/android/jack/preprocessor/PreProcessorTest.java
+++ b/jack/tests/com/android/jack/preprocessor/PreProcessorTest.java
@@ -16,7 +16,6 @@
package com.android.jack.preprocessor;
-import com.android.jack.Main;
import com.android.jack.Options;
import com.android.jack.TestTools;
import com.android.jack.ir.ast.JAnnotationType;
@@ -30,7 +29,6 @@ import junit.framework.Assert;
import org.antlr.runtime.ANTLRFileStream;
import org.antlr.runtime.CommonTokenStream;
-import org.junit.BeforeClass;
import org.junit.Test;
import java.io.File;
@@ -38,11 +36,6 @@ import java.util.Collection;
public class PreProcessorTest {
- @BeforeClass
- public static void setUpClass() throws Exception {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
- }
-
@Test
public void test001() throws Exception {
File testDir = TestTools.getJackTestsWithJackFolder("preprocessor/test001");
diff --git a/jack/tests/com/android/jack/shrob/TreeTest.java b/jack/tests/com/android/jack/shrob/TreeTest.java
index 7823d29..bf27811 100644
--- a/jack/tests/com/android/jack/shrob/TreeTest.java
+++ b/jack/tests/com/android/jack/shrob/TreeTest.java
@@ -16,7 +16,6 @@
package com.android.jack.shrob;
-import com.android.jack.Main;
import com.android.jack.Options;
import com.android.jack.ProguardFlags;
import com.android.jack.TestTools;
@@ -40,7 +39,6 @@ public class TreeTest {
@BeforeClass
public static void setUpClass() {
- Main.class.getClassLoader().setDefaultAssertionStatus(true);
CORE_SOURCELIST = TestTools.getTargetLibSourcelist("core-libart");
}
diff --git a/jack/tests/com/android/jack/statistics/BlockStatisticsOnCore.java b/jack/tests/com/android/jack/statistics/BlockStatisticsOnCore.java
index 15a4abd..11b6a13 100644
--- a/jack/tests/com/android/jack/statistics/BlockStatisticsOnCore.java
+++ b/jack/tests/com/android/jack/statistics/BlockStatisticsOnCore.java
@@ -33,7 +33,6 @@ import com.android.sched.scheduler.SubPlanBuilder;
import junit.framework.Assert;
-import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
@@ -42,11 +41,6 @@ import javax.annotation.Nonnull;
@Ignore("Tree")
public class BlockStatisticsOnCore {
- @BeforeClass
- public static void setUpClass() {
- BlockStatisticsOnCore.class.getClassLoader().setDefaultAssertionStatus(true);
- }
-
@Test
public void computeBlockStatOnCore() throws Exception {
Options compilerArgs =
diff --git a/jack/tests/com/android/jack/transformations/ast/ImplicitBlockTest.java b/jack/tests/com/android/jack/transformations/ast/ImplicitBlockTest.java
index 7d9a920..d967ecc 100644
--- a/jack/tests/com/android/jack/transformations/ast/ImplicitBlockTest.java
+++ b/jack/tests/com/android/jack/transformations/ast/ImplicitBlockTest.java
@@ -34,7 +34,6 @@ import com.android.sched.scheduler.SubPlanBuilder;
import junit.framework.Assert;
-import org.junit.BeforeClass;
import org.junit.Test;
import java.io.File;
@@ -49,11 +48,6 @@ public class ImplicitBlockTest {
@Nonnull
private static final File FILE = TestTools.getJackTestFromBinaryName(CLASS_BINARY_NAME);
- @BeforeClass
- public static void setUp() throws Exception {
- ImplicitBlockTest.class.getClassLoader().setDefaultAssertionStatus(true);
- }
-
@Test
public void implicitBlockIfThen() throws Exception {
buildMethodWithImplicitBlock("ifThen(I)I");
diff --git a/jack/tests/com/android/jack/transformations/ast/SynchronizedTest.java b/jack/tests/com/android/jack/transformations/ast/SynchronizedTest.java
index fbc2e97..101317b 100644
--- a/jack/tests/com/android/jack/transformations/ast/SynchronizedTest.java
+++ b/jack/tests/com/android/jack/transformations/ast/SynchronizedTest.java
@@ -41,7 +41,6 @@ import com.android.sched.scheduler.SubPlanBuilder;
import junit.framework.Assert;
-import org.junit.BeforeClass;
import org.junit.Test;
import java.io.File;
@@ -59,11 +58,6 @@ public class SynchronizedTest {
@Nonnull
private static final File FILE = TestTools.getJackTestFromBinaryName(CLASS_BINARY_NAME);
- @BeforeClass
- public static void setUp() throws Exception {
- SynchronizedTest.class.getClassLoader().setDefaultAssertionStatus(true);
- }
-
@Test
public void synchronizedStaticMethod() throws Exception {
JMethod method = buildMethodAndRunSynchronizeTransformer("syncStaticMethod(I)I");
diff --git a/jack/tests/com/android/jack/transformations/ast/TypeLegalizerTest.java b/jack/tests/com/android/jack/transformations/ast/TypeLegalizerTest.java
index 0207a4e..4c785fa 100644
--- a/jack/tests/com/android/jack/transformations/ast/TypeLegalizerTest.java
+++ b/jack/tests/com/android/jack/transformations/ast/TypeLegalizerTest.java
@@ -28,7 +28,6 @@ import com.android.jack.ir.ast.JPrimitiveType.JPrimitiveTypeEnum;
import com.android.jack.ir.sourceinfo.SourceInfo;
import com.android.jack.transformations.request.TransformationRequest;
-import org.junit.BeforeClass;
import org.junit.Test;
import java.util.ArrayList;
@@ -36,10 +35,6 @@ import java.util.List;
public class TypeLegalizerTest {
- @BeforeClass
- public static void setUp() throws Exception {
- TypeLegalizerTest.class.getClassLoader().setDefaultAssertionStatus(true);
- }
@Test
public void testNewArrayWithJLongLiteralAsDimension() throws Exception {
diff --git a/jack/tests/com/android/jack/transformations/ast/string/StringSplittingTest.java b/jack/tests/com/android/jack/transformations/ast/string/StringSplittingTest.java
index e781bac..da19bac 100644
--- a/jack/tests/com/android/jack/transformations/ast/string/StringSplittingTest.java
+++ b/jack/tests/com/android/jack/transformations/ast/string/StringSplittingTest.java
@@ -19,16 +19,10 @@ package com.android.jack.transformations.ast.string;
import com.android.jack.signature.GenericSignatureParser;
import org.junit.Assert;
-import org.junit.BeforeClass;
import org.junit.Test;
public class StringSplittingTest {
- @BeforeClass
- public static void setUpClass() throws Exception {
- StringSplittingTest.class.getClassLoader().setDefaultAssertionStatus(true);
- }
-
@Test
public void testTypeStringSplitting() {
DummyAction parserActions = new DummyAction();
diff --git a/jack/tests/com/android/jack/transformations/cast/UselessCastRemoverTest.java b/jack/tests/com/android/jack/transformations/cast/UselessCastRemoverTest.java
index da5db0c..cd8cbd5 100644
--- a/jack/tests/com/android/jack/transformations/cast/UselessCastRemoverTest.java
+++ b/jack/tests/com/android/jack/transformations/cast/UselessCastRemoverTest.java
@@ -25,7 +25,6 @@ import com.android.jack.ir.ast.JVisitor;
import junit.framework.Assert;
-import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
@@ -41,11 +40,6 @@ public class UselessCastRemoverTest {
@Nonnull
private static final String CAST_USELESS003 = "com/android/jack/cast/useless003/jack/UselessCast";
- @BeforeClass
- public static void setUp() throws Exception {
- UselessCastRemoverTest.class.getClassLoader().setDefaultAssertionStatus(true);
- }
-
@Test
public void castObjectToArray() throws Exception {
final String methodSignature = "castObjectToArray(Ljava/lang/Object;)[Ljava/lang/Object;";
diff --git a/sched/tests/com/android/sched/item/ItemsTest.java b/sched/tests/com/android/sched/item/ItemsTest.java
index 9f306ed..33ff650 100644
--- a/sched/tests/com/android/sched/item/ItemsTest.java
+++ b/sched/tests/com/android/sched/item/ItemsTest.java
@@ -24,19 +24,12 @@ import com.android.sched.marker.Marker3;
import com.android.sched.marker.Marker4;
import com.android.sched.marker.Marker5;
import com.android.sched.marker.Marker6;
-import com.android.sched.marker.StaticMarkerManager;
import org.junit.After;
-import org.junit.Before;
import org.junit.Test;
public class ItemsTest {
- @Before
- public void setUp() throws Exception {
- StaticMarkerManager.class.getClassLoader().setDefaultAssertionStatus(true);
- }
-
@After
public void tearDown() throws Exception {}
diff --git a/sched/tests/com/android/sched/marker/ManagedMarkerTest.java b/sched/tests/com/android/sched/marker/ManagedMarkerTest.java
index 0519e14..95f9f45 100644
--- a/sched/tests/com/android/sched/marker/ManagedMarkerTest.java
+++ b/sched/tests/com/android/sched/marker/ManagedMarkerTest.java
@@ -18,14 +18,9 @@ package com.android.sched.marker;
import static org.junit.Assert.fail;
-import org.junit.Before;
import org.junit.Test;
public class ManagedMarkerTest {
- @Before
- public void setUp() {
- StaticMarkerManager.class.getClassLoader().setDefaultAssertionStatus(true);
- }
@Test
public void testConstructor() {
diff --git a/sched/tests/com/android/sched/scheduler/ManagedVisitorTest.java b/sched/tests/com/android/sched/scheduler/ManagedVisitorTest.java
index 1390f01..3d186fa 100644
--- a/sched/tests/com/android/sched/scheduler/ManagedVisitorTest.java
+++ b/sched/tests/com/android/sched/scheduler/ManagedVisitorTest.java
@@ -20,16 +20,10 @@ import static org.junit.Assert.fail;
import com.android.sched.schedulable.AdapterSchedulable;
-import org.junit.Before;
import org.junit.Test;
public class ManagedVisitorTest {
- @Before
- public void setUp() {
- ManagedVisitor.class.getClassLoader().setDefaultAssertionStatus(true);
- }
-
@Test
public void testConstructor() {
testVisitorError(VisitorError1.class);
diff --git a/sched/tests/com/android/sched/scheduler/SchedulerTests.java b/sched/tests/com/android/sched/scheduler/SchedulerTests.java
index d4618c5..535d2f4 100644
--- a/sched/tests/com/android/sched/scheduler/SchedulerTests.java
+++ b/sched/tests/com/android/sched/scheduler/SchedulerTests.java
@@ -38,8 +38,6 @@ public class SchedulerTests {
@Before
public void setUp() throws Exception {
- Scheduler.class.getClassLoader().setDefaultAssertionStatus(true);
-
scheduler = Scheduler.getScheduler();
SchedulableManager sm = SchedulableManager.getSchedulableManager();
diff --git a/sched/tests/com/android/sched/util/config/cli/TokenIteratorTest.java b/sched/tests/com/android/sched/util/config/cli/TokenIteratorTest.java
index f14582f..9863e17 100644
--- a/sched/tests/com/android/sched/util/config/cli/TokenIteratorTest.java
+++ b/sched/tests/com/android/sched/util/config/cli/TokenIteratorTest.java
@@ -36,7 +36,6 @@ import com.android.sched.util.location.NoLocation;
import com.android.sched.util.location.StringLocation;
import org.junit.After;
-import org.junit.Before;
import org.junit.Test;
import java.io.File;
@@ -47,10 +46,6 @@ import java.util.NoSuchElementException;
import javax.annotation.Nonnull;
public class TokenIteratorTest {
- @Before
- public void setUp() throws Exception {
- TokenIteratorTest.class.getClassLoader().setDefaultAssertionStatus(true);
- }
@After
public void tearDown() throws Exception {
diff --git a/sched/tests/com/android/sched/util/file/FileUtilsTest.java b/sched/tests/com/android/sched/util/file/FileUtilsTest.java
index 0b178dc..d336501 100644
--- a/sched/tests/com/android/sched/util/file/FileUtilsTest.java
+++ b/sched/tests/com/android/sched/util/file/FileUtilsTest.java
@@ -18,7 +18,6 @@ package com.android.sched.util.file;
import junit.framework.Assert;
-import org.junit.BeforeClass;
import org.junit.Test;
import java.io.File;
@@ -29,12 +28,6 @@ import java.io.IOException;
*/
public class FileUtilsTest {
- @BeforeClass
- public static void setUpClass() {
- // Enable assertions
- FileUtilsTest.class.getClassLoader().setDefaultAssertionStatus(true);
- }
-
/**
* Test method for {@link com.android.sched.util.file.FileUtils#getFileSeparator()}.
*/
diff --git a/sched/tests/com/android/sched/vfs/VFSTest.java b/sched/tests/com/android/sched/vfs/VFSTest.java
index b056e42..7194300 100644
--- a/sched/tests/com/android/sched/vfs/VFSTest.java
+++ b/sched/tests/com/android/sched/vfs/VFSTest.java
@@ -61,7 +61,6 @@ public class VFSTest {
@Before
public void setUp() throws ConfigurationException {
- VFSTest.class.getClassLoader().setDefaultAssertionStatus(true);
ThreadConfig.setConfig(new AsapConfigBuilder().build());
}