diff options
author | Jean-Marie Henaff <jmhenaff@google.com> | 2015-06-12 16:29:20 +0200 |
---|---|---|
committer | Jean-Marie Henaff <jmhenaff@google.com> | 2015-06-24 13:53:21 +0200 |
commit | f1828481ebcfee3bddc323fca178a4502a60ceef (patch) | |
tree | 1a706277eaae29edc8f7f8532f7686383689cc95 /sched/tests/com | |
parent | c33c369849c5864b1e918fb4995cd88a2f67aba4 (diff) | |
download | toolchain_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
Diffstat (limited to 'sched/tests/com')
7 files changed, 0 insertions, 33 deletions
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()); } |