diff options
author | Sven Gothel <[email protected]> | 2013-08-31 16:31:50 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-08-31 16:31:50 +0200 |
commit | 10a28c860bd3f4ccecef156c9bbbc88087bf568d (patch) | |
tree | db6dfa4b0fd6ae6355da163d03ba3371c7530715 /src/junit/com | |
parent | ae1dd6990fb4f0f20cc908916a9cb68f0be866ff (diff) |
Bump junit 4.8.2 -> 4.11 (incl. hamcrest 1.2) ; TestTempJarCache uses '@FixMethodOrder(MethodSorters.NAME_ASCENDING)' annotation
Issue: Java7 unit test order is no more predictable
Fix: junit 4.11 performs a determined (not defined default) test order.
Additionally user can force ascending method name test order
Produced a drop-in junit.jar / junit-source.zip replacement, which includes
- junit version version 4.11
- hamcrest-core version 1.3
Diffstat (limited to 'src/junit/com')
-rw-r--r-- | src/junit/com/jogamp/common/util/TestTempJarCache.java | 4 | ||||
-rw-r--r-- | src/junit/com/jogamp/junit/util/JunitTracer.java | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/junit/com/jogamp/common/util/TestTempJarCache.java b/src/junit/com/jogamp/common/util/TestTempJarCache.java index 62a916a..e357a2e 100644 --- a/src/junit/com/jogamp/common/util/TestTempJarCache.java +++ b/src/junit/com/jogamp/common/util/TestTempJarCache.java @@ -29,6 +29,7 @@ package com.jogamp.common.util; import java.io.File; + import java.io.IOException; import java.lang.reflect.Method; import java.net.URI; @@ -40,7 +41,9 @@ import java.util.jar.JarFile; import junit.framework.Assert; import org.junit.BeforeClass; +import org.junit.FixMethodOrder; import org.junit.Test; +import org.junit.runners.MethodSorters; import com.jogamp.common.GlueGenVersion; import com.jogamp.common.jvm.JNILibLoaderBase; @@ -52,6 +55,7 @@ import com.jogamp.common.util.cache.TempFileCache; import com.jogamp.common.util.cache.TempJarCache; import com.jogamp.junit.util.JunitTracer; +@FixMethodOrder(MethodSorters.NAME_ASCENDING) public class TestTempJarCache extends JunitTracer { static TempFileCache fileCache; diff --git a/src/junit/com/jogamp/junit/util/JunitTracer.java b/src/junit/com/jogamp/junit/util/JunitTracer.java index befc2ad..555f27f 100644 --- a/src/junit/com/jogamp/junit/util/JunitTracer.java +++ b/src/junit/com/jogamp/junit/util/JunitTracer.java @@ -33,10 +33,13 @@ import org.junit.Before; import org.junit.BeforeClass; import org.junit.After; import org.junit.AfterClass; +import org.junit.FixMethodOrder; import org.junit.Rule; import org.junit.rules.TestName; +import org.junit.runners.MethodSorters; +@FixMethodOrder(MethodSorters.NAME_ASCENDING) public abstract class JunitTracer { @Rule public TestName _unitTestName = new TestName(); |