diff options
author | Sven Gothel <[email protected]> | 2014-10-03 04:43:51 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-10-03 04:43:51 +0200 |
commit | fb60db3a633d82a0323f066a98a8a9fadf3ecff5 (patch) | |
tree | 17ff9cb71b0652f4086880c5b0aedf54084ceb74 /src/junit/com/jogamp/common/util | |
parent | bd240ebfe09b7c7a21689dee8be0cc673eb7f340 (diff) |
SingletonTestCase: Move singleton test impl. from JOGL's UITestCase, inherit from JunitTracer and use it for all tests.
- Certain performance tests don't make sense utilizing several jenkins unit tests on one machine,
hence singleton test execution is desired.
- JOGL's UITestCase also will derive from this SingletonTestCase
Diffstat (limited to 'src/junit/com/jogamp/common/util')
22 files changed, 44 insertions, 44 deletions
diff --git a/src/junit/com/jogamp/common/util/IntIntHashMapTest.java b/src/junit/com/jogamp/common/util/IntIntHashMapTest.java index 75524ac..2de0c38 100644 --- a/src/junit/com/jogamp/common/util/IntIntHashMapTest.java +++ b/src/junit/com/jogamp/common/util/IntIntHashMapTest.java @@ -40,7 +40,7 @@ import org.junit.BeforeClass; import org.junit.Test; import com.jogamp.common.os.Platform; -import com.jogamp.junit.util.JunitTracer; +import com.jogamp.junit.util.SingletonTestCase; import static org.junit.Assert.*; import static java.lang.System.*; @@ -54,7 +54,7 @@ import org.junit.FixMethodOrder; import org.junit.runners.MethodSorters; @FixMethodOrder(MethodSorters.NAME_ASCENDING) -public class IntIntHashMapTest extends JunitTracer { +public class IntIntHashMapTest extends SingletonTestCase { private static int iterations; private static IntIntUniqueRndValues pairs; diff --git a/src/junit/com/jogamp/common/util/IntObjectHashMapTest.java b/src/junit/com/jogamp/common/util/IntObjectHashMapTest.java index 3207683..9e5618b 100644 --- a/src/junit/com/jogamp/common/util/IntObjectHashMapTest.java +++ b/src/junit/com/jogamp/common/util/IntObjectHashMapTest.java @@ -40,7 +40,7 @@ import org.junit.BeforeClass; import org.junit.Test; import com.jogamp.common.os.Platform; -import com.jogamp.junit.util.JunitTracer; +import com.jogamp.junit.util.SingletonTestCase; import static org.junit.Assert.*; @@ -53,7 +53,7 @@ import org.junit.FixMethodOrder; import org.junit.runners.MethodSorters; @FixMethodOrder(MethodSorters.NAME_ASCENDING) -public class IntObjectHashMapTest extends JunitTracer { +public class IntObjectHashMapTest extends SingletonTestCase { private static int iterations; private static IntIntObjUniqueRndValues pairs; diff --git a/src/junit/com/jogamp/common/util/LongIntHashMapTest.java b/src/junit/com/jogamp/common/util/LongIntHashMapTest.java index 90e54b9..9f868ba 100644 --- a/src/junit/com/jogamp/common/util/LongIntHashMapTest.java +++ b/src/junit/com/jogamp/common/util/LongIntHashMapTest.java @@ -40,7 +40,7 @@ import org.junit.BeforeClass; import org.junit.Test; import com.jogamp.common.os.Platform; -import com.jogamp.junit.util.JunitTracer; +import com.jogamp.junit.util.SingletonTestCase; import static org.junit.Assert.*; import static java.lang.System.*; @@ -54,7 +54,7 @@ import org.junit.FixMethodOrder; import org.junit.runners.MethodSorters; @FixMethodOrder(MethodSorters.NAME_ASCENDING) -public class LongIntHashMapTest extends JunitTracer { +public class LongIntHashMapTest extends SingletonTestCase { private static int iterations; private static LongIntUniqueRndValues pairs; diff --git a/src/junit/com/jogamp/common/util/TestArrayHashSet01.java b/src/junit/com/jogamp/common/util/TestArrayHashSet01.java index 4f63fbe..f8e2c22 100644 --- a/src/junit/com/jogamp/common/util/TestArrayHashSet01.java +++ b/src/junit/com/jogamp/common/util/TestArrayHashSet01.java @@ -34,13 +34,13 @@ import java.io.IOException; import org.junit.Assert; import org.junit.Test; -import com.jogamp.junit.util.JunitTracer; +import com.jogamp.junit.util.SingletonTestCase; import org.junit.FixMethodOrder; import org.junit.runners.MethodSorters; @FixMethodOrder(MethodSorters.NAME_ASCENDING) -public class TestArrayHashSet01 extends JunitTracer { +public class TestArrayHashSet01 extends SingletonTestCase { public static class Dummy { int i1, i2, i3; diff --git a/src/junit/com/jogamp/common/util/TestBitstream00.java b/src/junit/com/jogamp/common/util/TestBitstream00.java index 7bf4167..02d8c78 100644 --- a/src/junit/com/jogamp/common/util/TestBitstream00.java +++ b/src/junit/com/jogamp/common/util/TestBitstream00.java @@ -42,7 +42,7 @@ import com.jogamp.common.os.Platform; import static com.jogamp.common.util.BitstreamData.*; -import com.jogamp.junit.util.JunitTracer; +import com.jogamp.junit.util.SingletonTestCase; import org.junit.FixMethodOrder; import org.junit.runners.MethodSorters; @@ -51,7 +51,7 @@ import org.junit.runners.MethodSorters; * Test basic bit operations for {@link Bitstream} */ @FixMethodOrder(MethodSorters.NAME_ASCENDING) -public class TestBitstream00 extends JunitTracer { +public class TestBitstream00 extends SingletonTestCase { @Test public void test00ShowByteOrder() { diff --git a/src/junit/com/jogamp/common/util/TestBitstream01.java b/src/junit/com/jogamp/common/util/TestBitstream01.java index f0415bc..bd8f563 100644 --- a/src/junit/com/jogamp/common/util/TestBitstream01.java +++ b/src/junit/com/jogamp/common/util/TestBitstream01.java @@ -34,7 +34,7 @@ import java.nio.ByteBuffer; import org.junit.Assert; import org.junit.Test; -import com.jogamp.junit.util.JunitTracer; +import com.jogamp.junit.util.SingletonTestCase; import static com.jogamp.common.util.BitstreamData.*; import org.junit.FixMethodOrder; @@ -53,7 +53,7 @@ import org.junit.runners.MethodSorters; * </ul> */ @FixMethodOrder(MethodSorters.NAME_ASCENDING) -public class TestBitstream01 extends JunitTracer { +public class TestBitstream01 extends SingletonTestCase { Bitstream<ByteBuffer> getTestStream(final boolean msbFirst, final int preBits, final int skipBits, final int postBits) throws IOException { final int byteCount = ( preBits + skipBits + postBits + 7 ) / 8; diff --git a/src/junit/com/jogamp/common/util/TestBitstream02.java b/src/junit/com/jogamp/common/util/TestBitstream02.java index e1a9eb0..e5789e7 100644 --- a/src/junit/com/jogamp/common/util/TestBitstream02.java +++ b/src/junit/com/jogamp/common/util/TestBitstream02.java @@ -35,7 +35,7 @@ import org.junit.Assert; import org.junit.Test; import com.jogamp.common.nio.Buffers; -import com.jogamp.junit.util.JunitTracer; +import com.jogamp.junit.util.SingletonTestCase; import static com.jogamp.common.util.BitstreamData.*; @@ -51,7 +51,7 @@ import org.junit.runners.MethodSorters; * </ul> */ @FixMethodOrder(MethodSorters.NAME_ASCENDING) -public class TestBitstream02 extends JunitTracer { +public class TestBitstream02 extends SingletonTestCase { @Test public void test01Int8BitsAligned() throws IOException { diff --git a/src/junit/com/jogamp/common/util/TestBitstream03.java b/src/junit/com/jogamp/common/util/TestBitstream03.java index 29debc8..02555a5 100644 --- a/src/junit/com/jogamp/common/util/TestBitstream03.java +++ b/src/junit/com/jogamp/common/util/TestBitstream03.java @@ -36,7 +36,7 @@ import org.junit.Assert; import org.junit.Test; import com.jogamp.common.nio.Buffers; -import com.jogamp.junit.util.JunitTracer; +import com.jogamp.junit.util.SingletonTestCase; import static com.jogamp.common.util.BitstreamData.*; @@ -52,7 +52,7 @@ import org.junit.runners.MethodSorters; * </ul> */ @FixMethodOrder(MethodSorters.NAME_ASCENDING) -public class TestBitstream03 extends JunitTracer { +public class TestBitstream03 extends SingletonTestCase { @Test public void test01Int16BitsAligned() throws IOException { diff --git a/src/junit/com/jogamp/common/util/TestBitstream04.java b/src/junit/com/jogamp/common/util/TestBitstream04.java index f61ebea..b05f0ff 100644 --- a/src/junit/com/jogamp/common/util/TestBitstream04.java +++ b/src/junit/com/jogamp/common/util/TestBitstream04.java @@ -36,7 +36,7 @@ import org.junit.Assert; import org.junit.Test; import com.jogamp.common.nio.Buffers; -import com.jogamp.junit.util.JunitTracer; +import com.jogamp.junit.util.SingletonTestCase; import static com.jogamp.common.util.BitstreamData.*; @@ -52,7 +52,7 @@ import org.junit.runners.MethodSorters; * </ul> */ @FixMethodOrder(MethodSorters.NAME_ASCENDING) -public class TestBitstream04 extends JunitTracer { +public class TestBitstream04 extends SingletonTestCase { @Test public void test01Int32BitsAligned() throws IOException { diff --git a/src/junit/com/jogamp/common/util/TestFloatStack01.java b/src/junit/com/jogamp/common/util/TestFloatStack01.java index c0c1a2f..409236e 100644 --- a/src/junit/com/jogamp/common/util/TestFloatStack01.java +++ b/src/junit/com/jogamp/common/util/TestFloatStack01.java @@ -35,13 +35,13 @@ import java.util.Arrays; import org.junit.Assert; import org.junit.Test; -import com.jogamp.junit.util.JunitTracer; +import com.jogamp.junit.util.SingletonTestCase; import org.junit.FixMethodOrder; import org.junit.runners.MethodSorters; @FixMethodOrder(MethodSorters.NAME_ASCENDING) -public class /*testname*/TestFloatStack01/*testname*/ extends JunitTracer { +public class /*testname*/TestFloatStack01/*testname*/ extends SingletonTestCase { static final boolean equals(final /*value*/float/*value*/[] b, final int bOffset, final /*value*/float/*value*/[] stack, final int stackOffset, final int length) { diff --git a/src/junit/com/jogamp/common/util/TestIOUtil01.java b/src/junit/com/jogamp/common/util/TestIOUtil01.java index 68f472f..bbe0d64 100644 --- a/src/junit/com/jogamp/common/util/TestIOUtil01.java +++ b/src/junit/com/jogamp/common/util/TestIOUtil01.java @@ -45,13 +45,13 @@ import org.junit.Test; import com.jogamp.common.os.MachineDescription; import com.jogamp.common.os.Platform; -import com.jogamp.junit.util.JunitTracer; +import com.jogamp.junit.util.SingletonTestCase; import org.junit.FixMethodOrder; import org.junit.runners.MethodSorters; @FixMethodOrder(MethodSorters.NAME_ASCENDING) -public class TestIOUtil01 extends JunitTracer { +public class TestIOUtil01 extends SingletonTestCase { static final MachineDescription machine = Platform.getMachineDescription(); static final int tsz = machine.pageSizeInBytes() + machine.pageSizeInBytes() / 2 ; diff --git a/src/junit/com/jogamp/common/util/TestIteratorIndexCORE.java b/src/junit/com/jogamp/common/util/TestIteratorIndexCORE.java index 110d1cd..9ade783 100644 --- a/src/junit/com/jogamp/common/util/TestIteratorIndexCORE.java +++ b/src/junit/com/jogamp/common/util/TestIteratorIndexCORE.java @@ -34,13 +34,13 @@ import java.io.IOException; import org.junit.Test; import com.jogamp.common.os.Platform; -import com.jogamp.junit.util.JunitTracer; +import com.jogamp.junit.util.SingletonTestCase; import org.junit.FixMethodOrder; import org.junit.runners.MethodSorters; @FixMethodOrder(MethodSorters.NAME_ASCENDING) -public class TestIteratorIndexCORE extends JunitTracer { +public class TestIteratorIndexCORE extends SingletonTestCase { static int elems = 10; static int loop = ( Platform.getCPUFamily() == Platform.CPUFamily.ARM ) ? 20 : 9999999; diff --git a/src/junit/com/jogamp/common/util/TestJarUtil.java b/src/junit/com/jogamp/common/util/TestJarUtil.java index 06a2e43..42aa707 100644 --- a/src/junit/com/jogamp/common/util/TestJarUtil.java +++ b/src/junit/com/jogamp/common/util/TestJarUtil.java @@ -51,13 +51,13 @@ import com.jogamp.common.os.AndroidVersion; import com.jogamp.common.util.cache.TempCacheReg; import com.jogamp.common.util.cache.TempFileCache; import com.jogamp.common.util.cache.TempJarCache; -import com.jogamp.junit.util.JunitTracer; +import com.jogamp.junit.util.SingletonTestCase; import org.junit.FixMethodOrder; import org.junit.runners.MethodSorters; @FixMethodOrder(MethodSorters.NAME_ASCENDING) -public class TestJarUtil extends JunitTracer { +public class TestJarUtil extends SingletonTestCase { static TempFileCache fileCache; @BeforeClass diff --git a/src/junit/com/jogamp/common/util/TestPlatform01.java b/src/junit/com/jogamp/common/util/TestPlatform01.java index ebdfe19..acdced3 100644 --- a/src/junit/com/jogamp/common/util/TestPlatform01.java +++ b/src/junit/com/jogamp/common/util/TestPlatform01.java @@ -33,13 +33,13 @@ import org.junit.Test; import com.jogamp.common.os.MachineDescription; import com.jogamp.common.os.Platform; -import com.jogamp.junit.util.JunitTracer; +import com.jogamp.junit.util.SingletonTestCase; import org.junit.FixMethodOrder; import org.junit.runners.MethodSorters; @FixMethodOrder(MethodSorters.NAME_ASCENDING) -public class TestPlatform01 extends JunitTracer { +public class TestPlatform01 extends SingletonTestCase { @Test public void testInfo00() { diff --git a/src/junit/com/jogamp/common/util/TestRunnableTask01.java b/src/junit/com/jogamp/common/util/TestRunnableTask01.java index feb0468..7c2f27a 100644 --- a/src/junit/com/jogamp/common/util/TestRunnableTask01.java +++ b/src/junit/com/jogamp/common/util/TestRunnableTask01.java @@ -34,13 +34,13 @@ import java.lang.reflect.InvocationTargetException; import org.junit.Assert; import org.junit.Test; -import com.jogamp.junit.util.JunitTracer; +import com.jogamp.junit.util.SingletonTestCase; import org.junit.FixMethodOrder; import org.junit.runners.MethodSorters; @FixMethodOrder(MethodSorters.NAME_ASCENDING) -public class TestRunnableTask01 extends JunitTracer { +public class TestRunnableTask01 extends SingletonTestCase { @Test public void testInvokeAndWait00() throws IOException, InterruptedException, InvocationTargetException { diff --git a/src/junit/com/jogamp/common/util/TestSystemPropsAndEnvs.java b/src/junit/com/jogamp/common/util/TestSystemPropsAndEnvs.java index a78957a..44eea42 100644 --- a/src/junit/com/jogamp/common/util/TestSystemPropsAndEnvs.java +++ b/src/junit/com/jogamp/common/util/TestSystemPropsAndEnvs.java @@ -35,13 +35,13 @@ import java.util.Properties; import org.junit.Test; -import com.jogamp.junit.util.JunitTracer; +import com.jogamp.junit.util.SingletonTestCase; import org.junit.FixMethodOrder; import org.junit.runners.MethodSorters; @FixMethodOrder(MethodSorters.NAME_ASCENDING) -public class TestSystemPropsAndEnvs extends JunitTracer { +public class TestSystemPropsAndEnvs extends SingletonTestCase { @Test public void dumpProperties() { diff --git a/src/junit/com/jogamp/common/util/TestTempJarCache.java b/src/junit/com/jogamp/common/util/TestTempJarCache.java index 474a17a..20b14fb 100644 --- a/src/junit/com/jogamp/common/util/TestTempJarCache.java +++ b/src/junit/com/jogamp/common/util/TestTempJarCache.java @@ -51,10 +51,10 @@ import com.jogamp.common.os.Platform; import com.jogamp.common.util.cache.TempCacheReg; import com.jogamp.common.util.cache.TempFileCache; import com.jogamp.common.util.cache.TempJarCache; -import com.jogamp.junit.util.JunitTracer; +import com.jogamp.junit.util.SingletonTestCase; @FixMethodOrder(MethodSorters.NAME_ASCENDING) -public class TestTempJarCache extends JunitTracer { +public class TestTempJarCache extends SingletonTestCase { static TempFileCache fileCache; static class TestClassLoader extends URLClassLoader { diff --git a/src/junit/com/jogamp/common/util/TestVersionInfo.java b/src/junit/com/jogamp/common/util/TestVersionInfo.java index 7466d0d..f548e39 100644 --- a/src/junit/com/jogamp/common/util/TestVersionInfo.java +++ b/src/junit/com/jogamp/common/util/TestVersionInfo.java @@ -32,13 +32,13 @@ import java.io.IOException; import org.junit.Test; import com.jogamp.common.GlueGenVersion; -import com.jogamp.junit.util.JunitTracer; +import com.jogamp.junit.util.SingletonTestCase; import org.junit.FixMethodOrder; import org.junit.runners.MethodSorters; @FixMethodOrder(MethodSorters.NAME_ASCENDING) -public class TestVersionInfo extends JunitTracer { +public class TestVersionInfo extends SingletonTestCase { @Test public void testInfo01() { diff --git a/src/junit/com/jogamp/common/util/TestVersionNumber.java b/src/junit/com/jogamp/common/util/TestVersionNumber.java index 2b4f6d2..2959d18 100644 --- a/src/junit/com/jogamp/common/util/TestVersionNumber.java +++ b/src/junit/com/jogamp/common/util/TestVersionNumber.java @@ -33,13 +33,13 @@ import java.io.IOException; import org.junit.Assert; import org.junit.Test; -import com.jogamp.junit.util.JunitTracer; +import com.jogamp.junit.util.SingletonTestCase; import org.junit.FixMethodOrder; import org.junit.runners.MethodSorters; @FixMethodOrder(MethodSorters.NAME_ASCENDING) -public class TestVersionNumber extends JunitTracer { +public class TestVersionNumber extends SingletonTestCase { @Test public void test01() { diff --git a/src/junit/com/jogamp/common/util/TestVersionSemantics.java b/src/junit/com/jogamp/common/util/TestVersionSemantics.java index edc0dc2..8163ffb 100644 --- a/src/junit/com/jogamp/common/util/TestVersionSemantics.java +++ b/src/junit/com/jogamp/common/util/TestVersionSemantics.java @@ -42,7 +42,7 @@ import org.semver.Delta; import com.jogamp.common.GlueGenVersion; import com.jogamp.common.util.VersionNumberString; -import com.jogamp.junit.util.JunitTracer; +import com.jogamp.junit.util.SingletonTestCase; import com.jogamp.junit.util.VersionSemanticsUtil; /** @@ -64,7 +64,7 @@ import com.jogamp.junit.util.VersionSemanticsUtil; * @throws URISyntaxException */ @FixMethodOrder(MethodSorters.NAME_ASCENDING) -public class TestVersionSemantics extends JunitTracer { +public class TestVersionSemantics extends SingletonTestCase { static final String jarFile = "gluegen-rt.jar"; static final VersionNumberString preVersionNumber = new VersionNumberString("2.2.0"); static final Delta.CompatibilityType expectedCompatibilityType = Delta.CompatibilityType.NON_BACKWARD_COMPATIBLE; diff --git a/src/junit/com/jogamp/common/util/locks/TestRecursiveLock01.java b/src/junit/com/jogamp/common/util/locks/TestRecursiveLock01.java index 26677c0..09d96f2 100644 --- a/src/junit/com/jogamp/common/util/locks/TestRecursiveLock01.java +++ b/src/junit/com/jogamp/common/util/locks/TestRecursiveLock01.java @@ -38,13 +38,13 @@ import org.junit.Assert; import org.junit.Test; import com.jogamp.common.os.Platform; -import com.jogamp.junit.util.JunitTracer; +import com.jogamp.junit.util.SingletonTestCase; import org.junit.FixMethodOrder; import org.junit.runners.MethodSorters; @FixMethodOrder(MethodSorters.NAME_ASCENDING) -public class TestRecursiveLock01 extends JunitTracer { +public class TestRecursiveLock01 extends SingletonTestCase { public enum YieldMode { NONE(0), YIELD(1), SLEEP(2); diff --git a/src/junit/com/jogamp/common/util/locks/TestRecursiveThreadGroupLock01.java b/src/junit/com/jogamp/common/util/locks/TestRecursiveThreadGroupLock01.java index b361463..b338abe 100644 --- a/src/junit/com/jogamp/common/util/locks/TestRecursiveThreadGroupLock01.java +++ b/src/junit/com/jogamp/common/util/locks/TestRecursiveThreadGroupLock01.java @@ -34,13 +34,13 @@ import org.junit.Assert; import org.junit.Test; import com.jogamp.common.os.Platform; -import com.jogamp.junit.util.JunitTracer; +import com.jogamp.junit.util.SingletonTestCase; import org.junit.FixMethodOrder; import org.junit.runners.MethodSorters; @FixMethodOrder(MethodSorters.NAME_ASCENDING) -public class TestRecursiveThreadGroupLock01 extends JunitTracer { +public class TestRecursiveThreadGroupLock01 extends SingletonTestCase { public enum YieldMode { NONE(0), YIELD(1), SLEEP(2); |