diff options
author | Sven Gothel <[email protected]> | 2013-02-28 21:55:02 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-02-28 21:55:02 +0100 |
commit | 692ee1477a5422cb119070ecd87321833c302873 (patch) | |
tree | f1d1883d099f2e9ed8719f3fab2eb257dc602c08 /src/junit | |
parent | 99a50b38f5650fedca0f207e03706ffa9492e50c (diff) |
Unit Tests: OSX/Java7 w/o 32bit tests ; Reliable Test1p*JavaEmitter JNI binding initialization
- OSX/Java7 w/o 32bit tests
OSX/Java7 has no 32bit JVM, disable d32 tests for such, using property 'use.macosx32'
- Reliable Test1p*JavaEmitter JNI binding initialization
Load libs and init JNI binding statically w/ @BeforeClass,
since OSX/Java7 for some reason gets confused (?) w/ init sequence.
This is no issue for JOGL etc .. as far we have observed.
Diffstat (limited to 'src/junit')
-rw-r--r-- | src/junit/com/jogamp/gluegen/test/junit/generation/Test1p1JavaEmitter.java | 7 | ||||
-rw-r--r-- | src/junit/com/jogamp/gluegen/test/junit/generation/Test1p2ProcAddressEmitter.java | 12 |
2 files changed, 10 insertions, 9 deletions
diff --git a/src/junit/com/jogamp/gluegen/test/junit/generation/Test1p1JavaEmitter.java b/src/junit/com/jogamp/gluegen/test/junit/generation/Test1p1JavaEmitter.java index 35907de..60159be 100644 --- a/src/junit/com/jogamp/gluegen/test/junit/generation/Test1p1JavaEmitter.java +++ b/src/junit/com/jogamp/gluegen/test/junit/generation/Test1p1JavaEmitter.java @@ -31,9 +31,8 @@ package com.jogamp.gluegen.test.junit.generation; import java.io.IOException; import com.jogamp.gluegen.test.junit.generation.impl.Bindingtest1p1Impl; -import com.jogamp.gluegen.test.junit.generation.impl.Bindingtest1p2Impl; - +import org.junit.BeforeClass; import org.junit.Test; @@ -46,8 +45,8 @@ public class Test1p1JavaEmitter extends BaseClass { /** * Verifies loading of the new library. */ - @Test - public void chapter01TestLoadLibrary() throws Exception { + @BeforeClass + public static void chapter01TestLoadLibrary() throws Exception { BindingJNILibLoader.loadBindingtest1p1(); } diff --git a/src/junit/com/jogamp/gluegen/test/junit/generation/Test1p2ProcAddressEmitter.java b/src/junit/com/jogamp/gluegen/test/junit/generation/Test1p2ProcAddressEmitter.java index 3438c3d..64f17a5 100644 --- a/src/junit/com/jogamp/gluegen/test/junit/generation/Test1p2ProcAddressEmitter.java +++ b/src/junit/com/jogamp/gluegen/test/junit/generation/Test1p2ProcAddressEmitter.java @@ -34,7 +34,9 @@ import com.jogamp.gluegen.test.junit.generation.impl.Bindingtest1p2Impl; import com.jogamp.common.os.NativeLibrary; +import org.junit.AfterClass; import org.junit.Assert; +import org.junit.BeforeClass; import org.junit.Test; /** @@ -48,10 +50,10 @@ public class Test1p2ProcAddressEmitter extends BaseClass { /** * Verifies loading of the new library. */ - @Test - public void chapter01TestLoadLibrary() throws Exception { + @BeforeClass + public static void chapter01TestLoadLibrary() throws Exception { BindingJNILibLoader.loadBindingtest1p2(); - dynamicLookupHelper = NativeLibrary.open("test1", getClass().getClassLoader(), true); + dynamicLookupHelper = NativeLibrary.open("test1", Test1p2ProcAddressEmitter.class.getClassLoader(), true); Assert.assertNotNull("NativeLibrary.open(test1) failed", dynamicLookupHelper); Bindingtest1p2Impl.resetProcAddressTable(dynamicLookupHelper); @@ -122,8 +124,8 @@ public class Test1p2ProcAddressEmitter extends BaseClass { /** * Verifies unloading of the new library. */ - @Test - public void chapter0XTestUnloadLibrary() throws Exception { + @AfterClass + public static void chapter0XTestUnloadLibrary() throws Exception { Assert.assertNotNull(dynamicLookupHelper); dynamicLookupHelper.close(); dynamicLookupHelper = null; |