diff options
Diffstat (limited to 'src/junit/com/jogamp')
4 files changed, 4 insertions, 21 deletions
diff --git a/src/junit/com/jogamp/gluegen/test/junit/generation/BaseClass.java b/src/junit/com/jogamp/gluegen/test/junit/generation/BaseClass.java index 2edfb5e..dc49475 100644 --- a/src/junit/com/jogamp/gluegen/test/junit/generation/BaseClass.java +++ b/src/junit/com/jogamp/gluegen/test/junit/generation/BaseClass.java @@ -54,6 +54,10 @@ import org.junit.Assert; */ public class BaseClass extends SingletonJunitCase { + static { + Platform.initSingleton(); // 1st initialize GlueGen itself + } + /** * Verifies the existence and creation of the generated class. */ diff --git a/src/junit/com/jogamp/gluegen/test/junit/generation/Test2p1FuncPtr.java b/src/junit/com/jogamp/gluegen/test/junit/generation/Test2p1FuncPtr.java index 82247ce..91e4526 100644 --- a/src/junit/com/jogamp/gluegen/test/junit/generation/Test2p1FuncPtr.java +++ b/src/junit/com/jogamp/gluegen/test/junit/generation/Test2p1FuncPtr.java @@ -41,16 +41,12 @@ import java.io.IOException; @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class Test2p1FuncPtr extends BaseTest2FuncPtr { - static NativeLibrary dynamicLookupHelper; - /** * Verifies loading of the new library. */ @BeforeClass public static void chapter__TestLoadLibrary() throws Exception { BindingJNILibLoader.loadBindingtest2p1(); - dynamicLookupHelper = NativeLibrary.open("test2", false, false, Test2p1FuncPtr.class.getClassLoader(), true); - Assert.assertNotNull("NativeLibrary.open(test2) failed", dynamicLookupHelper); } /** @@ -58,9 +54,6 @@ public class Test2p1FuncPtr extends BaseTest2FuncPtr { */ @AfterClass public static void chapter0XTestUnloadLibrary() throws Exception { - Assert.assertNotNull(dynamicLookupHelper); - dynamicLookupHelper.close(); - dynamicLookupHelper = null; } @Test diff --git a/src/junit/com/jogamp/gluegen/test/junit/generation/Test3p1PtrStorage.java b/src/junit/com/jogamp/gluegen/test/junit/generation/Test3p1PtrStorage.java index bbe7986..531b761 100644 --- a/src/junit/com/jogamp/gluegen/test/junit/generation/Test3p1PtrStorage.java +++ b/src/junit/com/jogamp/gluegen/test/junit/generation/Test3p1PtrStorage.java @@ -41,16 +41,12 @@ import java.io.IOException; @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class Test3p1PtrStorage extends BaseTest3PtrStorage { - static NativeLibrary dynamicLookupHelper; - /** * Verifies loading of the new library. */ @BeforeClass public static void chapter__TestLoadLibrary() throws Exception { BindingJNILibLoader.loadBindingtest2p1(); - dynamicLookupHelper = NativeLibrary.open("test2", false, false, Test3p1PtrStorage.class.getClassLoader(), true); - Assert.assertNotNull("NativeLibrary.open(test2) failed", dynamicLookupHelper); } /** @@ -58,9 +54,6 @@ public class Test3p1PtrStorage extends BaseTest3PtrStorage { */ @AfterClass public static void chapter0XTestUnloadLibrary() throws Exception { - Assert.assertNotNull(dynamicLookupHelper); - dynamicLookupHelper.close(); - dynamicLookupHelper = null; } @Test diff --git a/src/junit/com/jogamp/gluegen/test/junit/generation/Test4p1JavaCallback.java b/src/junit/com/jogamp/gluegen/test/junit/generation/Test4p1JavaCallback.java index b07faa7..cd6b56e 100644 --- a/src/junit/com/jogamp/gluegen/test/junit/generation/Test4p1JavaCallback.java +++ b/src/junit/com/jogamp/gluegen/test/junit/generation/Test4p1JavaCallback.java @@ -41,16 +41,12 @@ import java.io.IOException; @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class Test4p1JavaCallback extends BaseTest4JavaCallback { - static NativeLibrary dynamicLookupHelper; - /** * Verifies loading of the new library. */ @BeforeClass public static void chapter__TestLoadLibrary() throws Exception { BindingJNILibLoader.loadBindingtest2p1(); - dynamicLookupHelper = NativeLibrary.open("test2", false, false, Test4p1JavaCallback.class.getClassLoader(), true); - Assert.assertNotNull("NativeLibrary.open(test2) failed", dynamicLookupHelper); } /** @@ -58,9 +54,6 @@ public class Test4p1JavaCallback extends BaseTest4JavaCallback { */ @AfterClass public static void chapter0XTestUnloadLibrary() throws Exception { - Assert.assertNotNull(dynamicLookupHelper); - dynamicLookupHelper.close(); - dynamicLookupHelper = null; } @Test |