summaryrefslogtreecommitdiffstats
path: root/src/junit/com/jogamp/gluegen/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/junit/com/jogamp/gluegen/test')
-rw-r--r--src/junit/com/jogamp/gluegen/test/junit/generation/Test1p1JavaEmitter.java7
-rw-r--r--src/junit/com/jogamp/gluegen/test/junit/generation/Test1p2ProcAddressEmitter.java12
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;