29package com.jogamp.gluegen.test.junit.generation;
31import com.jogamp.gluegen.test.junit.generation.impl.Bindingtest1p1Impl;
32import com.jogamp.gluegen.test.junit.generation.impl.Bindingtest1p2Impl;
33import com.jogamp.common.os.DynamicLibraryBundle;
34import com.jogamp.common.os.DynamicLibraryBundleInfo;
35import com.jogamp.common.os.NativeLibrary;
36import com.jogamp.common.util.RunnableExecutor;
37import com.jogamp.common.util.TestIOUtil01;
39import java.util.ArrayList;
40import java.util.Arrays;
43import org.junit.AfterClass;
44import org.junit.Assert;
45import org.junit.BeforeClass;
47import org.junit.FixMethodOrder;
48import org.junit.runners.MethodSorters;
50@FixMethodOrder(MethodSorters.NAME_ASCENDING)
61 Assert.assertTrue(
"DynamicLibraryBundle failed", dlb.
isLibComplete());
64 Bindingtest1p2Impl.resetProcAddressTable(dlb);
72 testClassExist(
"test1p2");
80 chapter__TestCoverageSignature(
new Bindingtest1p2Impl());
92 chapter01TestStaticConstants(
new Bindingtest1p2Impl());
103 chapter03TestCoverageFunctionalityNIOAndPrimitiveArray(
new Bindingtest1p2Impl(),
true);
114 chapter03TestCoverageFunctionalityNIOAndPrimitiveArray(
new Bindingtest1p2Impl(),
false);
122 this.chapter04TestPointerBuffer(
new Bindingtest1p2Impl());
130 chapter05TestSomeFunctionsAllIndirect(
new Bindingtest1p2Impl());
138 chapter09TestCompoundAlignment(
new Bindingtest1p2Impl());
146 chapter10TestCompoundCallByReference(
new Bindingtest1p2Impl());
154 chapter11TestCompoundCallByValue(
new Bindingtest1p2Impl());
162 chapter12TestTKField(
new Bindingtest1p2Impl());
170 chapter13TestTKFieldImmutable(
new Bindingtest1p2Impl());
175 chapter14TestTKMixed(
new Bindingtest1p2Impl());
183 chapter15TestCustomJNICode(
new Bindingtest1p2Impl());
188 chapter16TestPascalString(
new Bindingtest1p2Impl());
196 Assert.assertNotNull(dlb);
201 @SuppressWarnings(
"unused")
202 public static
void main(final String args[]) throws Exception {
204 chapter__TestLoadLibrary();
209 org.junit.runner.JUnitCore.
main(tstname);
214 private static final List<String> glueLibNames;
216 glueLibNames =
new ArrayList<String>();
217 glueLibNames.add(
"Bindingtest1p2");
258 final List<List<String>> libNamesList =
new ArrayList<List<String>>();
260 final List<String> libNames =
new ArrayList<String>();
264 libNames.add(
"test1");
266 libNamesList.add(libNames);
final List< NativeLibrary > getToolLibraries()
Returns list of NativeLibrarys for each DynamicLibraryBundleInfo#getToolLibNames() in the same size a...
final void destroy()
Unload all NativeLibrarys, and remove all references.
final boolean isLibComplete()
static RunnableExecutor getDefaultRunnableExecutor()
Returns an AWT-EDT RunnableExecutor implementation if AWT is available, otherwise RunnableExecutor#cu...
final List< String > getToolGetProcAddressFuncNameList()
May return the native libraries.
final List< List< String > > getToolLibNames()
If a SecurityManager is installed, user needs link permissions for the named libraries.
final boolean useToolGetProcAdressFirst(final String funcName)
final RunnableExecutor getLibLoaderExecutor()
Returns a suitable RunnableExecutor implementation, which is being used to load the tool and glue nat...
final boolean searchToolLibSystemPathFirst()
Returns true if system path shall be searched first (default), rather than searching it last.
final long toolGetProcAddress(final long toolGetProcAddressHandle, final String funcName)
May implement the lookup function using the Tools facility.
final List< String > getGlueLibNames()
If a SecurityManager is installed, user needs link permissions for the named libraries.
final boolean shallLookupGlobal()
If method returns true and if a SecurityManager is installed, user needs link permissions for all lib...
final boolean searchToolLibInSystemPath()
Returns true if tool libraries shall be searched in the system path (default), otherwise false.
List< String > getSymbolForToolLibPath()
Returns optional list of optional symbol names per getToolLibNames() in same order for an OS which re...
final boolean shallLinkGlobal()
void chapter14TestTKMixed()
void chapter05TestSomeFunctionsAllIndirect()
This covers indirect primitive arrays and indirect NIO buffers.
void chapter01TestStaticConstants()
Verifies if all generated static constant values are completed, and whether their value is as expecte...
static void chapter__TestLoadLibrary()
Verifies loading of the new library.
static void chapter0XTestUnloadLibrary()
Verifies unloading of the new library.
void chapter03bTestCoverageFunctionalityIndirectNIOAndPrimitiveArray()
Verifies if all methods / signatures are properly generated, can be invoked and functions.
void chapter04TestPointerBuffer()
This covers direct / indirect pointer buffers.
void chapter11TestCompoundCallByValue()
This covers compounds (structs) call-by-value.
static void main(final String args[])
void chapter12TestTKField()
Test compound access read-write.
void chapter16TestPascalString()
void chapter__TestCoverageSignature()
Verifies if all generated method signatures are completed, ie a compilation only coverage test withou...
void chapter09TestCompoundAlignment()
This covers compounds (structs) data alignment.
void chapter00TestClassExist()
Verifies the existence and creation of the generated class.
void chapter03aTestCoverageFunctionalityDirectNIOAndPrimitiveArray()
Verifies if all methods / signatures are properly generated, can be invoked and functions.
void chapter10TestCompoundCallByReference()
This covers compounds (structs) call-by-reference.
void chapter13TestTKFieldImmutable()
Test compound access read-only.
void chapter15TestCustomJNICode()
Test Custom JNI Code invocation.