summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-05-10 09:25:20 +0200
committerSven Gothel <[email protected]>2010-05-10 09:25:20 +0200
commiteb33345f2bf83f35fa9c425f9d23a5f0a7107983 (patch)
treeddf2df3f4e259d80f06280eb8bd270d82c97aaa1
parent6c7247cdca7f4c89433789be8170c3a9937e5050 (diff)
Move HashMapTest to junit.run; Unify classes to only 'Test' in their name if they are a junit test.
-rw-r--r--make/build-junit.xml56
-rw-r--r--src/junit/com/jogamp/common/util/IntIntHashMapTest.java (renamed from test/junit/com/jogamp/common/util/IntIntHashMapTest.java)0
-rw-r--r--src/junit/com/jogamp/common/util/LongIntHashMapTest.java (renamed from test/junit/com/jogamp/common/util/LongIntHashMapTest.java)0
-rw-r--r--src/junit/com/jogamp/gluegen/test/junit/generation/BaseClass.java (renamed from src/junit/com/jogamp/gluegen/test/junit/generation/BaseTest1.java)110
-rw-r--r--src/junit/com/jogamp/gluegen/test/junit/generation/BindingJNILibLoader.java8
-rw-r--r--src/junit/com/jogamp/gluegen/test/junit/generation/Test1p1JavaEmitter.java14
-rw-r--r--src/junit/com/jogamp/gluegen/test/junit/generation/Test1p2ProcAddressEmitter.java16
-rw-r--r--src/junit/com/jogamp/gluegen/test/junit/generation/test1-gluegen.cfg2
-rw-r--r--src/junit/com/jogamp/gluegen/test/junit/generation/test1p1-gluegen.cfg8
-rw-r--r--src/junit/com/jogamp/gluegen/test/junit/generation/test1p2-gluegen.cfg18
10 files changed, 117 insertions, 115 deletions
diff --git a/make/build-junit.xml b/make/build-junit.xml
index de97027..dc0506b 100644
--- a/make/build-junit.xml
+++ b/make/build-junit.xml
@@ -26,8 +26,10 @@
<property name="make" value="." />
<property name="test.base.dir" value="${gluegen.root}/src/junit" />
- <property name="test.junit.rel" value="com/jogamp/gluegen/test/junit" />
+ <property name="test.junit.rel" value="com/jogamp" />
<property name="test.junit.dir" value="${test.base.dir}/${test.junit.rel}" />
+ <property name="test.junit.generation.rel" value="${test.junit.rel}/gluegen/test/junit/generation" />
+ <property name="test.junit.generation.dir" value="${test.base.dir}/${test.junit.generation.rel}" />
<property name="test.dir" value="${gluegen.root}/${rootrel.build}/test"/>
<property name="results" value="${test.dir}/results" />
@@ -37,7 +39,6 @@
<property name="build_t.obj" value="${build_t}/obj"/>
<property name="build_t.lib" value="${build_t}/natives"/>
- <property name="test.junit.rootrel" value="src/junit/${test.junit.rel}" />
<property name="build_t.gen.rootrel" value="${rootrel.build}/test/build/gensrc"/>
<mkdir dir="${test.dir}"/>
@@ -80,6 +81,7 @@
<echo message="test.base.dir: ${test.base.dir} "/>
<echo message="test.junit.dir: ${test.junit.dir} "/>
+ <echo message="test.junit.generation.dir: ${test.junit.generation.dir} "/>
<echo message="test.dir: ${test.dir} "/>
<echo message="results: ${results} "/>
<echo message="build_t: ${build_t} "/>
@@ -162,7 +164,7 @@
<sysincludepath path="${java.includes.dir}"/>
<sysincludepath path="${java.includes.dir.platform}"/>
<includepath path="${stub.includes.dir}/common"/>
- <includepath path="${test.junit.dir}/generation"/>
+ <includepath path="${test.junit.generation.dir}"/>
<includepath path="${build_t.gen}/native"/>
</compiler>
@@ -217,7 +219,7 @@
<batchtest todir="${results}">
<fileset dir="${build_t.java}">
- <include name="${test.junit.rel}/**/Test*"/>
+ <include name="${test.junit.rel}/**/*Test*"/>
</fileset>
<formatter usefile="false" type="brief"/>
<formatter usefile="true" type="xml"/>
@@ -251,32 +253,32 @@
<echo message=" - - - junit.test1.java.generate" />
<dirset id="stub.includes.fileset.test" dir=".">
- <include name="${test.junit.dir}/generation/**"/>
+ <include name="${test.junit.generation.dir}/**"/>
<include name="${stub.includes.dir}/**" />
</dirset>
- <gluegen src="${test.junit.dir}/generation/test1-gluegen.c"
+ <gluegen src="${test.junit.generation.dir}/test1-gluegen.c"
outputRootDir="${build_t.gen}"
- config="${test.junit.dir}/generation/test1-gluegen.cfg"
- literalInclude="${test.junit.dir}/generation"
+ config="${test.junit.generation.dir}/test1-gluegen.cfg"
+ literalInclude="${test.junit.generation.dir}"
includeRefid="stub.includes.fileset.test"
emitter="com.sun.gluegen.JavaEmitter">
<classpath refid="gluegen.classpath" />
</gluegen>
- <gluegen src="${test.junit.dir}/generation/test1-gluegen.c"
+ <gluegen src="${test.junit.generation.dir}/test1-gluegen.c"
outputRootDir="${build_t.gen}"
- config="${test.junit.dir}/generation/test1p1-gluegen.cfg"
- literalInclude="${test.junit.dir}/generation"
+ config="${test.junit.generation.dir}/test1p1-gluegen.cfg"
+ literalInclude="${test.junit.generation.dir}"
includeRefid="stub.includes.fileset.test"
emitter="com.sun.gluegen.JavaEmitter">
<classpath refid="gluegen.classpath" />
</gluegen>
- <gluegen src="${test.junit.dir}/generation/test1-gluegen.c"
+ <gluegen src="${test.junit.generation.dir}/test1-gluegen.c"
outputRootDir="${build_t.gen}"
- config="${test.junit.dir}/generation/test1p2-gluegen.cfg"
- literalInclude="${test.junit.dir}/generation"
+ config="${test.junit.generation.dir}/test1p2-gluegen.cfg"
+ literalInclude="${test.junit.generation.dir}"
includeRefid="stub.includes.fileset.test"
emitter="com.sun.gluegen.procaddress.ProcAddressEmitter">
<classpath refid="gluegen.classpath" />
@@ -288,7 +290,7 @@
<!-- this is the test1 implementation -->
<target name="junit.test1i.c.build">
<patternset id="junit.test1i.c.src.files">
- <include name="${test.junit.rootrel}/generation/test1.c"/>
+ <include name="src/junit/${test.junit.generation.rel}/test1.c"/>
</patternset>
<!-- Windows hacks ro make a proper DLL -->
@@ -306,23 +308,23 @@
<!-- this is a fixed binding to the test1 implementation -->
<target name="junit.test1p1.c.build">
<linker id="linker.test1.fixed.cfg.id" extends="${linker.cfg.id}">
- <linkerarg value="-Wl,-soname=BindingTest1p1.dll" if="isMingW"/>
- <linkerarg value="-Wl,--output=BindingTest1p1.dll" if="isMingW"/>
+ <linkerarg value="-Wl,-soname=Bindingtest1p1.dll" if="isMingW"/>
+ <linkerarg value="-Wl,--output=Bindingtest1p1.dll" if="isMingW"/>
<syslibset dir="${build_t.lib}" libs="test1"/>
</linker>
<patternset id="junit.test1p1.c.src.files">
- <include name="${build_t.gen.rootrel}/native/BindingTest1p1Impl_JNI.c"/>
+ <include name="${build_t.gen.rootrel}/native/Bindingtest1p1Impl_JNI.c"/>
</patternset>
<c.build c.compiler.src.files="junit.test1p1.c.src.files"
- output.lib.name="BindingTest1p1"
+ output.lib.name="Bindingtest1p1"
compiler.cfg.id="${compiler.cfg.id}"
linker.cfg.id="linker.test1.fixed.cfg.id"/>
<antcall target="rename.dylib" inheritRefs="true">
- <param name="src" value="${build_t.lib}/libBindingTest1p1.dylib" />
- <param name="dest" value="${build_t.lib}/libBindingTest1p1.jnilib" />
+ <param name="src" value="${build_t.lib}/libBindingtest1p1.dylib" />
+ <param name="dest" value="${build_t.lib}/libBindingtest1p1.jnilib" />
</antcall>
</target>
@@ -330,22 +332,22 @@
<!-- this is a dynamic lookup binding to the test1 implementation -->
<target name="junit.test1p2.c.build">
<linker id="linker.test1.runtime.cfg.id" extends="${linker.cfg.id}">
- <linkerarg value="-Wl,-soname=BindingTest1p2.dll" if="isMingW"/>
- <linkerarg value="-Wl,--output=BindingTest1p2.dll" if="isMingW"/>
+ <linkerarg value="-Wl,-soname=Bindingtest1p2.dll" if="isMingW"/>
+ <linkerarg value="-Wl,--output=Bindingtest1p2.dll" if="isMingW"/>
</linker>
<patternset id="junit.test1p2.c.src.files">
- <include name="${build_t.gen.rootrel}/native/BindingTest1p2Impl_JNI.c"/>
+ <include name="${build_t.gen.rootrel}/native/Bindingtest1p2Impl_JNI.c"/>
</patternset>
<c.build c.compiler.src.files="junit.test1p2.c.src.files"
- output.lib.name="BindingTest1p2"
+ output.lib.name="Bindingtest1p2"
compiler.cfg.id="${compiler.cfg.id}"
linker.cfg.id="linker.test1.runtime.cfg.id"/>
<antcall target="rename.dylib" inheritRefs="true">
- <param name="src" value="${build_t.lib}/libBindingTest1p2.dylib" />
- <param name="dest" value="${build_t.lib}/libBindingTest1p2.jnilib" />
+ <param name="src" value="${build_t.lib}/libBindingtest1p2.dylib" />
+ <param name="dest" value="${build_t.lib}/libBindingtest1p2.jnilib" />
</antcall>
</target>
diff --git a/test/junit/com/jogamp/common/util/IntIntHashMapTest.java b/src/junit/com/jogamp/common/util/IntIntHashMapTest.java
index bc02947..bc02947 100644
--- a/test/junit/com/jogamp/common/util/IntIntHashMapTest.java
+++ b/src/junit/com/jogamp/common/util/IntIntHashMapTest.java
diff --git a/test/junit/com/jogamp/common/util/LongIntHashMapTest.java b/src/junit/com/jogamp/common/util/LongIntHashMapTest.java
index b51211c..b51211c 100644
--- a/test/junit/com/jogamp/common/util/LongIntHashMapTest.java
+++ b/src/junit/com/jogamp/common/util/LongIntHashMapTest.java
diff --git a/src/junit/com/jogamp/gluegen/test/junit/generation/BaseTest1.java b/src/junit/com/jogamp/gluegen/test/junit/generation/BaseClass.java
index 5a5d17c..fec8e6d 100644
--- a/src/junit/com/jogamp/gluegen/test/junit/generation/BaseTest1.java
+++ b/src/junit/com/jogamp/gluegen/test/junit/generation/BaseClass.java
@@ -58,7 +58,7 @@ import static com.jogamp.gluegen.test.junit.generation.BuildEnvironment.*;
* @author Michael Bien
* @author Sven Gothel
*/
-public class BaseTest1 {
+public class BaseClass {
/**
* Verifies the existence and creation of the generated class.
@@ -77,14 +77,14 @@ public class BaseTest1 {
Object obj = clazzImpl.newInstance();
Assert.assertTrue("Not of type "+ifName, clazzIf.isAssignableFrom(obj.getClass()));
- Assert.assertTrue("Not of type com.jogamp.gluegen.test.junit.generation.BindingTest1", (obj instanceof com.jogamp.gluegen.test.junit.generation.BindingTest1));
+ Assert.assertTrue("Not of type com.jogamp.gluegen.test.junit.generation.Bindingtest1", (obj instanceof com.jogamp.gluegen.test.junit.generation.Bindingtest1));
}
/**
* Verifies if all generated method signatures are completed,
* ie a compilation only coverage test without functional tests.
*/
- public void chapter__TestCoverageSignature(BindingTest1 binding) throws Exception {
+ public void chapter__TestCoverageSignature(Bindingtest1 binding) throws Exception {
int i;
long result;
long context = 0;
@@ -147,7 +147,7 @@ public class BaseTest1 {
* This is a compilation (coverage) and runtime time (semantic) test.
* This covers indirect primitive arrays and direct NIO buffers.
*/
- public void chapter03TestCoverageFunctionalityDirectNIOAndPrimitiveArray(BindingTest1 binding) throws Exception {
+ public void chapter03TestCoverageFunctionalityDirectNIOAndPrimitiveArray(Bindingtest1 binding) throws Exception {
int i;
long result;
@@ -159,35 +159,35 @@ public class BaseTest1 {
Int64Buffer bb2L = Int64Buffer.wrap(bb2);
bb2L.put(0, 100);
- IntBuffer ib1 = Buffers.newDirectByteBuffer(Buffers.SIZEOF_INT * BindingTest1.ARRAY_SIZE).asIntBuffer();
- for(i=0; i<BindingTest1.ARRAY_SIZE; i++) {
+ IntBuffer ib1 = Buffers.newDirectByteBuffer(Buffers.SIZEOF_INT * Bindingtest1.ARRAY_SIZE).asIntBuffer();
+ for(i=0; i<Bindingtest1.ARRAY_SIZE; i++) {
ib1.put(i, 1000);
}
- Int64Buffer lb1 = Int64Buffer.allocateDirect(BindingTest1.ARRAY_SIZE);
- for(i=0; i<BindingTest1.ARRAY_SIZE; i++) {
+ Int64Buffer lb1 = Int64Buffer.allocateDirect(Bindingtest1.ARRAY_SIZE);
+ for(i=0; i<Bindingtest1.ARRAY_SIZE; i++) {
lb1.put(i, 1000);
}
- Int64Buffer lb2 = Int64Buffer.allocateDirect(BindingTest1.ARRAY_SIZE);
- for(i=0; i<BindingTest1.ARRAY_SIZE; i++) {
+ Int64Buffer lb2 = Int64Buffer.allocateDirect(Bindingtest1.ARRAY_SIZE);
+ for(i=0; i<Bindingtest1.ARRAY_SIZE; i++) {
lb2.put(i, 10000);
}
- int[] iarray1 = new int[BindingTest1.ARRAY_SIZE];
+ int[] iarray1 = new int[Bindingtest1.ARRAY_SIZE];
int iarray1_offset = 0;
- for(i=0; i<BindingTest1.ARRAY_SIZE; i++) {
+ for(i=0; i<Bindingtest1.ARRAY_SIZE; i++) {
iarray1[i]= 1000;
}
- long[] larray1 = new long[BindingTest1.ARRAY_SIZE];
+ long[] larray1 = new long[Bindingtest1.ARRAY_SIZE];
int larray1_offset = 0;
- for(i=0; i<BindingTest1.ARRAY_SIZE; i++) {
+ for(i=0; i<Bindingtest1.ARRAY_SIZE; i++) {
larray1[i]= 1000;
}
- long[] larray2 = new long[BindingTest1.ARRAY_SIZE];
+ long[] larray2 = new long[Bindingtest1.ARRAY_SIZE];
int larray2_offset = 0;
- for(i=0; i<BindingTest1.ARRAY_SIZE; i++) {
+ for(i=0; i<Bindingtest1.ARRAY_SIZE; i++) {
larray2[i]= 10000;
}
@@ -215,43 +215,43 @@ public class BaseTest1 {
// Int64Buffer arrayTestFoo2 ( Int64Buffer )
{
lb2.rewind();
- Int64Buffer lb3 = Int64Buffer.allocateDirect(BindingTest1.ARRAY_SIZE);
+ Int64Buffer lb3 = Int64Buffer.allocateDirect(Bindingtest1.ARRAY_SIZE);
lb3.put(lb2);
lb3.rewind();
lb2.rewind();
// System.out.println("lb3: "+lb3);
- Assert.assertTrue("Wrong result: "+lb3.capacity(), BindingTest1.ARRAY_SIZE == lb3.capacity());
- Assert.assertTrue("Wrong result: "+lb3.remaining(), BindingTest1.ARRAY_SIZE == lb3.remaining());
+ Assert.assertTrue("Wrong result: "+lb3.capacity(), Bindingtest1.ARRAY_SIZE == lb3.capacity());
+ Assert.assertTrue("Wrong result: "+lb3.remaining(), Bindingtest1.ARRAY_SIZE == lb3.remaining());
Int64Buffer lbR = binding.arrayTestFoo2(lb3);
// System.out.println("lbR: "+lbR);
Assert.assertNotNull(lbR);
- Assert.assertTrue("Wrong result: "+lb3.capacity(), BindingTest1.ARRAY_SIZE == lb3.capacity());
- Assert.assertTrue("Wrong result: "+lb3.remaining(), BindingTest1.ARRAY_SIZE == lb3.remaining());
- Assert.assertTrue("Wrong result: "+lbR.capacity(), BindingTest1.ARRAY_SIZE == lbR.capacity());
- Assert.assertTrue("Wrong result: "+lbR.remaining(), BindingTest1.ARRAY_SIZE == lbR.remaining());
+ Assert.assertTrue("Wrong result: "+lb3.capacity(), Bindingtest1.ARRAY_SIZE == lb3.capacity());
+ Assert.assertTrue("Wrong result: "+lb3.remaining(), Bindingtest1.ARRAY_SIZE == lb3.remaining());
+ Assert.assertTrue("Wrong result: "+lbR.capacity(), Bindingtest1.ARRAY_SIZE == lbR.capacity());
+ Assert.assertTrue("Wrong result: "+lbR.remaining(), Bindingtest1.ARRAY_SIZE == lbR.remaining());
int j=0;
- for(j=0; j<BindingTest1.ARRAY_SIZE; j++) {
+ for(j=0; j<Bindingtest1.ARRAY_SIZE; j++) {
Assert.assertTrue("Wrong result: s:"+lb3.get(j)+" d: "+lbR.get(j), 1+lb3.get(j)==lbR.get(j));
}
}
// Int64Buffer arrayTestFoo2 ( long[], int )
{
- long[] larray3 = new long[BindingTest1.ARRAY_SIZE];
- for(i=0; i<BindingTest1.ARRAY_SIZE; i++) {
+ long[] larray3 = new long[Bindingtest1.ARRAY_SIZE];
+ for(i=0; i<Bindingtest1.ARRAY_SIZE; i++) {
larray3[i]= larray2[i];
}
Int64Buffer lbR = binding.arrayTestFoo2(larray3, 0);
Assert.assertNotNull(lbR);
- Assert.assertTrue("Wrong result: "+lbR.capacity(), BindingTest1.ARRAY_SIZE == lbR.capacity());
- Assert.assertTrue("Wrong result: "+lbR.remaining(), BindingTest1.ARRAY_SIZE == lbR.remaining());
+ Assert.assertTrue("Wrong result: "+lbR.capacity(), Bindingtest1.ARRAY_SIZE == lbR.capacity());
+ Assert.assertTrue("Wrong result: "+lbR.remaining(), Bindingtest1.ARRAY_SIZE == lbR.remaining());
int j=0;
- for(j=0; j<BindingTest1.ARRAY_SIZE; j++) {
+ for(j=0; j<Bindingtest1.ARRAY_SIZE; j++) {
Assert.assertTrue("Wrong result: s:"+larray3[j]+" d: "+lbR.get(j), 1+larray3[j]==lbR.get(j));
}
}
@@ -260,31 +260,31 @@ public class BaseTest1 {
// PointerBuffer arrayTestFoo3PtrPtr(PointerBuffer)
{
lb2.rewind();
- Int64Buffer lb3 = Int64Buffer.allocateDirect(BindingTest1.ARRAY_SIZE*BindingTest1.ARRAY_SIZE);
+ Int64Buffer lb3 = Int64Buffer.allocateDirect(Bindingtest1.ARRAY_SIZE*Bindingtest1.ARRAY_SIZE);
int j;
- for(j=0; j<BindingTest1.ARRAY_SIZE; j++) {
+ for(j=0; j<Bindingtest1.ARRAY_SIZE; j++) {
lb3.put(lb2);
lb2.rewind();
}
lb3.rewind();
// System.out.println("lb3: "+lb3);
- Assert.assertTrue("Wrong result: "+lb3.capacity(), BindingTest1.ARRAY_SIZE*BindingTest1.ARRAY_SIZE == lb3.capacity());
- Assert.assertTrue("Wrong result: "+lb3.remaining(), BindingTest1.ARRAY_SIZE*BindingTest1.ARRAY_SIZE == lb3.remaining());
+ Assert.assertTrue("Wrong result: "+lb3.capacity(), Bindingtest1.ARRAY_SIZE*Bindingtest1.ARRAY_SIZE == lb3.capacity());
+ Assert.assertTrue("Wrong result: "+lb3.remaining(), Bindingtest1.ARRAY_SIZE*Bindingtest1.ARRAY_SIZE == lb3.remaining());
PointerBuffer pb = binding.arrayTestFoo3ArrayToPtrPtr(lb3);
// System.out.println("pb: "+pb);
- Assert.assertTrue("Wrong result: "+pb.capacity(), BindingTest1.ARRAY_SIZE == pb.capacity());
- Assert.assertTrue("Wrong result: "+pb.remaining(), BindingTest1.ARRAY_SIZE == pb.remaining());
+ Assert.assertTrue("Wrong result: "+pb.capacity(), Bindingtest1.ARRAY_SIZE == pb.capacity());
+ Assert.assertTrue("Wrong result: "+pb.remaining(), Bindingtest1.ARRAY_SIZE == pb.remaining());
PointerBuffer pb2 = binding.arrayTestFoo3PtrPtr(pb);
Assert.assertNotNull(pb2);
- Assert.assertTrue("Wrong result: "+pb2.capacity(), BindingTest1.ARRAY_SIZE == pb2.capacity());
- Assert.assertTrue("Wrong result: "+pb2.remaining(), BindingTest1.ARRAY_SIZE == pb2.remaining());
- for(j=0; j<BindingTest1.ARRAY_SIZE*BindingTest1.ARRAY_SIZE; j++) {
- Assert.assertTrue("Wrong result: s:"+lb2.get(j%BindingTest1.ARRAY_SIZE)+" d: "+lb3.get(j),
- 1+lb2.get(j%BindingTest1.ARRAY_SIZE)==lb3.get(j));
+ Assert.assertTrue("Wrong result: "+pb2.capacity(), Bindingtest1.ARRAY_SIZE == pb2.capacity());
+ Assert.assertTrue("Wrong result: "+pb2.remaining(), Bindingtest1.ARRAY_SIZE == pb2.remaining());
+ for(j=0; j<Bindingtest1.ARRAY_SIZE*Bindingtest1.ARRAY_SIZE; j++) {
+ Assert.assertTrue("Wrong result: s:"+lb2.get(j%Bindingtest1.ARRAY_SIZE)+" d: "+lb3.get(j),
+ 1+lb2.get(j%Bindingtest1.ARRAY_SIZE)==lb3.get(j));
}
}
@@ -292,10 +292,10 @@ public class BaseTest1 {
// " "
// PointerBuffer arrayTestFoo3PtrPtr(PointerBuffer)
{
- PointerBuffer pb = PointerBuffer.allocateDirect(BindingTest1.ARRAY_SIZE);
+ PointerBuffer pb = PointerBuffer.allocateDirect(Bindingtest1.ARRAY_SIZE);
int j;
- for(j=0; j<BindingTest1.ARRAY_SIZE; j++) {
- Int64Buffer lb3 = Int64Buffer.allocateDirect(BindingTest1.ARRAY_SIZE);
+ for(j=0; j<Bindingtest1.ARRAY_SIZE; j++) {
+ Int64Buffer lb3 = Int64Buffer.allocateDirect(Bindingtest1.ARRAY_SIZE);
lb3.put(lb2);
lb2.rewind();
lb3.rewind();
@@ -305,20 +305,20 @@ public class BaseTest1 {
pb.rewind();
// System.out.println("lb3: "+lb3);
- Assert.assertTrue("Wrong result: "+pb.capacity(), BindingTest1.ARRAY_SIZE == pb.capacity());
- Assert.assertTrue("Wrong result: "+pb.remaining(), BindingTest1.ARRAY_SIZE == pb.remaining());
+ Assert.assertTrue("Wrong result: "+pb.capacity(), Bindingtest1.ARRAY_SIZE == pb.capacity());
+ Assert.assertTrue("Wrong result: "+pb.remaining(), Bindingtest1.ARRAY_SIZE == pb.remaining());
Assert.assertNotNull(pb.getReferencedBuffer(0));
Assert.assertTrue("Wrong result: "+pb.getReferencedBuffer(0)+" != "+lb2.getBuffer(), pb.getReferencedBuffer(0).equals(lb2.getBuffer()));
PointerBuffer pb2 = binding.arrayTestFoo3PtrPtr(pb);
Assert.assertNotNull(pb2);
- Assert.assertTrue("Wrong result: "+pb2.capacity(), BindingTest1.ARRAY_SIZE == pb2.capacity());
- Assert.assertTrue("Wrong result: "+pb2.remaining(), BindingTest1.ARRAY_SIZE == pb2.remaining());
- for(j=0; j<BindingTest1.ARRAY_SIZE; j++) {
+ Assert.assertTrue("Wrong result: "+pb2.capacity(), Bindingtest1.ARRAY_SIZE == pb2.capacity());
+ Assert.assertTrue("Wrong result: "+pb2.remaining(), Bindingtest1.ARRAY_SIZE == pb2.remaining());
+ for(j=0; j<Bindingtest1.ARRAY_SIZE; j++) {
ByteBuffer bb = (ByteBuffer) pb.getReferencedBuffer(j);
Int64Buffer i64b = Int64Buffer.wrap(bb);
- for(i=0; i<BindingTest1.ARRAY_SIZE; i++) {
+ for(i=0; i<Bindingtest1.ARRAY_SIZE; i++) {
Assert.assertTrue("Wrong result: ["+j+"]["+i+"] s:"+lb2.get(i)+" d: "+i64b.get(i), 1+lb2.get(i)==i64b.get(i));
}
}
@@ -378,8 +378,8 @@ public class BaseTest1 {
{
long cfg_base = 0xAABBCCDD11223344L;
- PointerBuffer pb = PointerBuffer.allocateDirect(BindingTest1.ARRAY_SIZE);
- for(i=0; i<BindingTest1.ARRAY_SIZE; i++) {
+ PointerBuffer pb = PointerBuffer.allocateDirect(Bindingtest1.ARRAY_SIZE);
+ for(i=0; i<Bindingtest1.ARRAY_SIZE; i++) {
long cfg_native;
if(Platform.is32Bit()) {
cfg_native = (cfg_base+i) & 0x00000000FFFFFFFFL; // umask 1st 32bit
@@ -395,9 +395,9 @@ public class BaseTest1 {
}
pb.rewind();
PointerBuffer pb2 = binding.typeTestAnonPointer(pb);
- Assert.assertTrue("Wrong result: "+pb2.capacity(), BindingTest1.ARRAY_SIZE == pb2.capacity());
- Assert.assertTrue("Wrong result: "+pb2.remaining(), BindingTest1.ARRAY_SIZE == pb2.remaining());
- for(i=0; i<BindingTest1.ARRAY_SIZE; i++) {
+ Assert.assertTrue("Wrong result: "+pb2.capacity(), Bindingtest1.ARRAY_SIZE == pb2.capacity());
+ Assert.assertTrue("Wrong result: "+pb2.remaining(), Bindingtest1.ARRAY_SIZE == pb2.remaining());
+ for(i=0; i<Bindingtest1.ARRAY_SIZE; i++) {
Assert.assertTrue("Wrong result: 0x"+Long.toHexString(pb.get(i))+"+1 != 0x"+Long.toHexString(pb2.get(i)), (pb.get(i)+1)==pb2.get(i));
}
}
@@ -406,7 +406,7 @@ public class BaseTest1 {
/**
* This covers indirect primitive arrays and indirect NIO buffers.
*/
- public void chapter04TestSomeFunctionsAllIndirect(BindingTest1 binding) throws Exception {
+ public void chapter04TestSomeFunctionsAllIndirect(Bindingtest1 binding) throws Exception {
int i;
long result;
diff --git a/src/junit/com/jogamp/gluegen/test/junit/generation/BindingJNILibLoader.java b/src/junit/com/jogamp/gluegen/test/junit/generation/BindingJNILibLoader.java
index 8d0093c..9cfbef0 100644
--- a/src/junit/com/jogamp/gluegen/test/junit/generation/BindingJNILibLoader.java
+++ b/src/junit/com/jogamp/gluegen/test/junit/generation/BindingJNILibLoader.java
@@ -37,19 +37,19 @@ import java.security.*;
public class BindingJNILibLoader extends JNILibLoaderBase {
- public static void loadBindingTest1p1() {
+ public static void loadBindingtest1p1() {
AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
- loadLibrary("BindingTest1p1", null, true);
+ loadLibrary("Bindingtest1p1", null, true);
return null;
}
});
}
- public static void loadBindingTest1p2() {
+ public static void loadBindingtest1p2() {
AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
- loadLibrary("BindingTest1p2", null, true);
+ loadLibrary("Bindingtest1p2", null, true);
return null;
}
});
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 814fc75..d4f8600 100644
--- a/src/junit/com/jogamp/gluegen/test/junit/generation/Test1p1JavaEmitter.java
+++ b/src/junit/com/jogamp/gluegen/test/junit/generation/Test1p1JavaEmitter.java
@@ -32,7 +32,7 @@
package com.jogamp.gluegen.test.junit.generation;
-import com.jogamp.gluegen.test.junit.generation.impl.BindingTest1p1Impl;
+import com.jogamp.gluegen.test.junit.generation.impl.Bindingtest1p1Impl;
import com.jogamp.common.nio.Buffers;
import com.jogamp.common.nio.PointerBuffer;
@@ -58,14 +58,14 @@ import static com.jogamp.gluegen.test.junit.generation.BuildEnvironment.*;
* @author Michael Bien
* @author Sven Gothel
*/
-public class Test1p1JavaEmitter extends BaseTest1 {
+public class Test1p1JavaEmitter extends BaseClass {
/**
* Verifies loading of the new library.
*/
@Test
public void chapter01TestLoadLibrary() throws Exception {
- BindingJNILibLoader.loadBindingTest1p1();
+ BindingJNILibLoader.loadBindingtest1p1();
}
/**
@@ -73,7 +73,7 @@ public class Test1p1JavaEmitter extends BaseTest1 {
*/
@Test
public void chapter02TestClassExist() throws Exception {
- testClassExist("Test1p1");
+ testClassExist("test1p1");
}
/**
@@ -81,7 +81,7 @@ public class Test1p1JavaEmitter extends BaseTest1 {
* ie a compilation only coverage test without functional tests.
*/
public void chapter__TestCoverageSignature() throws Exception {
- chapter__TestCoverageSignature(new BindingTest1p1Impl());
+ chapter__TestCoverageSignature(new Bindingtest1p1Impl());
}
/**
@@ -92,7 +92,7 @@ public class Test1p1JavaEmitter extends BaseTest1 {
*/
@Test
public void chapter03TestCoverageFunctionalityDirectNIOAndPrimitiveArray() throws Exception {
- chapter03TestCoverageFunctionalityDirectNIOAndPrimitiveArray(new BindingTest1p1Impl());
+ chapter03TestCoverageFunctionalityDirectNIOAndPrimitiveArray(new Bindingtest1p1Impl());
}
/**
@@ -100,7 +100,7 @@ public class Test1p1JavaEmitter extends BaseTest1 {
*/
@Test
public void chapter04TestSomeFunctionsAllIndirect() throws Exception {
- chapter04TestSomeFunctionsAllIndirect(new BindingTest1p1Impl());
+ chapter04TestSomeFunctionsAllIndirect(new Bindingtest1p1Impl());
}
}
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 a299799..1bfc6d0 100644
--- a/src/junit/com/jogamp/gluegen/test/junit/generation/Test1p2ProcAddressEmitter.java
+++ b/src/junit/com/jogamp/gluegen/test/junit/generation/Test1p2ProcAddressEmitter.java
@@ -32,7 +32,7 @@
package com.jogamp.gluegen.test.junit.generation;
-import com.jogamp.gluegen.test.junit.generation.impl.BindingTest1p2Impl;
+import com.jogamp.gluegen.test.junit.generation.impl.Bindingtest1p2Impl;
import com.jogamp.common.os.NativeLibrary;
import com.jogamp.common.os.DynamicLookupHelper;
@@ -46,7 +46,7 @@ import static com.jogamp.gluegen.test.junit.generation.BuildEnvironment.*;
* @author Michael Bien
* @author Sven Gothel
*/
-public class Test1p2ProcAddressEmitter extends BaseTest1 {
+public class Test1p2ProcAddressEmitter extends BaseClass {
DynamicLookupHelper dynamicLookupHelper;
@@ -55,11 +55,11 @@ public class Test1p2ProcAddressEmitter extends BaseTest1 {
*/
@Test
public void chapter01TestLoadLibrary() throws Exception {
- BindingJNILibLoader.loadBindingTest1p2();
+ BindingJNILibLoader.loadBindingtest1p2();
dynamicLookupHelper = NativeLibrary.open("test1", getClass().getClassLoader(), true);
Assert.assertNotNull("NativeLibrary.open(test1) failed", dynamicLookupHelper);
- BindingTest1p2Impl.resetProcAddressTable(dynamicLookupHelper);
+ Bindingtest1p2Impl.resetProcAddressTable(dynamicLookupHelper);
}
/**
@@ -67,7 +67,7 @@ public class Test1p2ProcAddressEmitter extends BaseTest1 {
*/
@Test
public void chapter02TestClassExist() throws Exception {
- testClassExist("Test1p2");
+ testClassExist("test1p2");
}
/**
@@ -75,7 +75,7 @@ public class Test1p2ProcAddressEmitter extends BaseTest1 {
* ie a compilation only coverage test without functional tests.
*/
public void chapter__TestCoverageSignature() throws Exception {
- chapter__TestCoverageSignature(new BindingTest1p2Impl());
+ chapter__TestCoverageSignature(new Bindingtest1p2Impl());
}
/**
@@ -86,7 +86,7 @@ public class Test1p2ProcAddressEmitter extends BaseTest1 {
*/
@Test
public void chapter03TestCoverageFunctionalityDirectNIOAndPrimitiveArray() throws Exception {
- chapter03TestCoverageFunctionalityDirectNIOAndPrimitiveArray(new BindingTest1p2Impl());
+ chapter03TestCoverageFunctionalityDirectNIOAndPrimitiveArray(new Bindingtest1p2Impl());
}
/**
@@ -94,7 +94,7 @@ public class Test1p2ProcAddressEmitter extends BaseTest1 {
*/
@Test
public void chapter04TestSomeFunctionsAllIndirect() throws Exception {
- chapter04TestSomeFunctionsAllIndirect(new BindingTest1p2Impl());
+ chapter04TestSomeFunctionsAllIndirect(new Bindingtest1p2Impl());
}
public static void main(String[] args) {
diff --git a/src/junit/com/jogamp/gluegen/test/junit/generation/test1-gluegen.cfg b/src/junit/com/jogamp/gluegen/test/junit/generation/test1-gluegen.cfg
index 971419e..bc8840a 100644
--- a/src/junit/com/jogamp/gluegen/test/junit/generation/test1-gluegen.cfg
+++ b/src/junit/com/jogamp/gluegen/test/junit/generation/test1-gluegen.cfg
@@ -1,5 +1,5 @@
Package com.jogamp.gluegen.test.junit.generation
-JavaClass BindingTest1
+JavaClass Bindingtest1
Style InterfaceOnly
JavaOutputDir classes
diff --git a/src/junit/com/jogamp/gluegen/test/junit/generation/test1p1-gluegen.cfg b/src/junit/com/jogamp/gluegen/test/junit/generation/test1p1-gluegen.cfg
index 2062512..6ef171b 100644
--- a/src/junit/com/jogamp/gluegen/test/junit/generation/test1p1-gluegen.cfg
+++ b/src/junit/com/jogamp/gluegen/test/junit/generation/test1p1-gluegen.cfg
@@ -1,14 +1,14 @@
Package com.jogamp.gluegen.test.junit.generation
-JavaClass BindingTest1p1
+JavaClass Bindingtest1p1
Style InterfaceAndImpl
JavaOutputDir classes
NativeOutputDir native
-Extends BindingTest1p1 BindingTest1
+Extends Bindingtest1p1 Bindingtest1
Include test1-common.cfg
-Import com.jogamp.gluegen.test.junit.generation.BindingTest1
-Import com.jogamp.gluegen.test.junit.generation.BindingTest1p1
+Import com.jogamp.gluegen.test.junit.generation.Bindingtest1
+Import com.jogamp.gluegen.test.junit.generation.Bindingtest1p1
diff --git a/src/junit/com/jogamp/gluegen/test/junit/generation/test1p2-gluegen.cfg b/src/junit/com/jogamp/gluegen/test/junit/generation/test1p2-gluegen.cfg
index d8ef816..649499d 100644
--- a/src/junit/com/jogamp/gluegen/test/junit/generation/test1p2-gluegen.cfg
+++ b/src/junit/com/jogamp/gluegen/test/junit/generation/test1p2-gluegen.cfg
@@ -1,14 +1,14 @@
Package com.jogamp.gluegen.test.junit.generation
-JavaClass BindingTest1p2
+JavaClass Bindingtest1p2
Style InterfaceAndImpl
JavaOutputDir classes
NativeOutputDir native
-Extends BindingTest1p2 BindingTest1
+Extends Bindingtest1p2 Bindingtest1
# Use a ProcAddressTable so we dynamically look up the routines
EmitProcAddressTable true
-ProcAddressTableClassName BindingTest1p2ProcAddressTable
+ProcAddressTableClassName Bindingtest1p2ProcAddressTable
GetProcAddressTableExpr _table
ProcAddressNameExpr PFN $UPPERCASE({0}) PROC
@@ -24,12 +24,12 @@ LocalProcAddressCallingConvention __ALL__ MYAPIENTRY
Include test1-common.cfg
Include ../../../../../../../../make/config/intptr.cfg
-Import com.jogamp.gluegen.test.junit.generation.BindingTest1
-Import com.jogamp.gluegen.test.junit.generation.BindingTest1p2
+Import com.jogamp.gluegen.test.junit.generation.Bindingtest1
+Import com.jogamp.gluegen.test.junit.generation.Bindingtest1p2
-CustomJavaCode BindingTest1p2Impl private static BindingTest1p2ProcAddressTable _table = new BindingTest1p2ProcAddressTable();
-CustomJavaCode BindingTest1p2Impl public static void resetProcAddressTable(DynamicLookupHelper lookup) {
-CustomJavaCode BindingTest1p2Impl _table.reset(lookup);
-CustomJavaCode BindingTest1p2Impl }
+CustomJavaCode Bindingtest1p2Impl private static Bindingtest1p2ProcAddressTable _table = new Bindingtest1p2ProcAddressTable();
+CustomJavaCode Bindingtest1p2Impl public static void resetProcAddressTable(DynamicLookupHelper lookup) {
+CustomJavaCode Bindingtest1p2Impl _table.reset(lookup);
+CustomJavaCode Bindingtest1p2Impl }