From 50084db95e9dfc842a64f11db6ce8014a54b2057 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 1 Dec 2011 16:26:33 +0100 Subject: Test: Add unload of libraries as last test. --- .../test/junit/generation/Test1p2ProcAddressEmitter.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) 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 c5dcdef..a881445 100644 --- a/src/junit/com/jogamp/gluegen/test/junit/generation/Test1p2ProcAddressEmitter.java +++ b/src/junit/com/jogamp/gluegen/test/junit/generation/Test1p2ProcAddressEmitter.java @@ -30,24 +30,20 @@ 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 com.jogamp.common.os.NativeLibrary; -import com.jogamp.common.os.DynamicLookupHelper; import org.junit.Assert; import org.junit.Test; -import static com.jogamp.gluegen.test.junit.generation.BuildEnvironment.*; - /** * @author Michael Bien * @author Sven Gothel */ public class Test1p2ProcAddressEmitter extends BaseClass { - DynamicLookupHelper dynamicLookupHelper; + NativeLibrary dynamicLookupHelper; /** * Verifies loading of the new library. @@ -123,6 +119,16 @@ public class Test1p2ProcAddressEmitter extends BaseClass { chapter09TestCompoundAndAlignment(new Bindingtest1p2Impl()); } + /** + * Verifies unloading of the new library. + */ + @Test + public void chapter0XTestUnloadLibrary() throws Exception { + Assert.assertNotNull(dynamicLookupHelper); + dynamicLookupHelper.close(); + dynamicLookupHelper = null; + } + public static void main(String args[]) throws IOException { String tstname = Test1p2ProcAddressEmitter.class.getName(); org.junit.runner.JUnitCore.main(tstname); -- cgit v1.2.3