summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-08-05 02:23:05 +0200
committerSven Gothel <[email protected]>2023-08-05 02:23:05 +0200
commit2e8b69496221f242fee762140418008a9a862d3d (patch)
treee69d2c6c31a5d64bfa1afa6246031563ac72f485 /src
parent94c68465331b10f548727483437a3f3b575ee287 (diff)
GlueGen Code Unit Tests using a statically linked tool library do not need to load the tool library dynamically, hence dropped.
Just ensure GlueGen itself is initializes via Platform.initSingleton() in common BaseClass
Diffstat (limited to 'src')
-rw-r--r--src/junit/com/jogamp/gluegen/test/junit/generation/BaseClass.java4
-rw-r--r--src/junit/com/jogamp/gluegen/test/junit/generation/Test2p1FuncPtr.java7
-rw-r--r--src/junit/com/jogamp/gluegen/test/junit/generation/Test3p1PtrStorage.java7
-rw-r--r--src/junit/com/jogamp/gluegen/test/junit/generation/Test4p1JavaCallback.java7
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