summaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-12-30 23:59:08 +0100
committerSven Gothel <[email protected]>2012-12-30 23:59:08 +0100
commitac16df0bab94fab313030ead42644844d1690a82 (patch)
treee972680bbc741c520c1e8ef02191dfd0f12850a5 /make
parent0104f0ff35304b0aa416c2caa7b53aadf592f36a (diff)
Add com.jogamp.common.util.PrimitiveStack (FloatStack and IntegerStack), a simple primitive stack implementation.
Currently only FILO put/get operations are implemented using either primitive arrays as I/O itself or <Type>Buffer. Unit tests are included.. Note: Only FloatStack is implemented in a manual, where others (IntegerStack) is derived (generated) from it. Same goes w/ unit tests.
Diffstat (limited to 'make')
-rw-r--r--make/build.xml57
-rwxr-xr-xmake/scripts/runtest.sh4
2 files changed, 56 insertions, 5 deletions
diff --git a/make/build.xml b/make/build.xml
index d4ec1b7..76187a1 100644
--- a/make/build.xml
+++ b/make/build.xml
@@ -602,14 +602,62 @@
</copy>
</target>
+ <target name="generate-primitive-stacks">
+
+ <!-- IntegerStack -->
+ <antcall target="create-pstack" inheritrefs="true">
+ <param name="pstack.name" value="IntegerStack"/>
+ <param name="pstack.testname" value="TestIntegerStack01"/>
+ <param name="pstack.value" value="int"/>
+ <param name="pstack.value2" value="IntBuffer"/>
+ </antcall>
+
+ </target>
+
+ <target name="create-pstack">
+ <copy file="${src.java}/com/jogamp/common/util/FloatStack.java"
+ tofile="${src.generated.java}/com/jogamp/common/util/${pstack.name}.java" overwrite="true">
+ <filterchain>
+ <replaceregex pattern="FloatStack" replace="${pstack.name}"/>
+ <replaceregex pattern="@see ${pstack.name}" replace="@see FloatStack"/>
+ <replaceregex pattern="/\*value\*/float/\*value\*/" replace="${pstack.value}"/>
+ <replaceregex pattern="/\*value2\*/FloatBuffer/\*value2\*/" replace="${pstack.value2}"/>
+ </filterchain>
+ </copy>
+ <mkdir dir="${gluegen.root}/${rootrel.build}/test/build/gensrc/classes"/>
+ <copy file="${gluegen.root}/src/junit/com/jogamp/common/util/TestFloatStack01.java"
+ tofile="${gluegen.root}/${rootrel.build}/test/build/gensrc/classes/com/jogamp/common/util/${pstack.testname}.java" overwrite="true">
+ <filterchain>
+ <replaceregex pattern="FloatStack" replace="${pstack.name}"/>
+ <replaceregex pattern="TestFloatStack01" replace="${pstack.testname}"/>
+ <replaceregex pattern="@see ${pstack.name}" replace="@see FloatStack"/>
+ <replaceregex pattern="/\*value\*/float/\*value\*/" replace="${pstack.value}"/>
+ <replaceregex pattern="/\*value2\*/FloatBuffer/\*value2\*/" replace="${pstack.value2}"/>
+ </filterchain>
+ </copy>
+ </target>
+
<target name="gluegen.build.check.java" depends="init">
- <uptodate property="gluegen.build.skip.java">
+ <uptodate property="gluegen.build.skip.java1">
<srcfiles dir= "." includes="*.xml"/>
<srcfiles dir= "${src.java}" includes="**"/>
<srcfiles dir= "${c.grammar}" includes="**/*.g"/>
<srcfiles dir= "${j.grammar}" includes="**/*.g"/>
<mapper type="merge" to="${build}/gluegen.jar"/>
</uptodate>
+ <uptodate property="gluegen.build.skip.java2">
+ <srcfiles dir= "." includes="*.xml"/>
+ <srcfiles dir= "${src.java}" includes="**"/>
+ <srcfiles dir= "${c.grammar}" includes="**/*.g"/>
+ <srcfiles dir= "${j.grammar}" includes="**/*.g"/>
+ <mapper type="merge" to="${build}/gluegen-rt.jar"/>
+ </uptodate>
+ <condition property="gluegen.build.skip.java" value="true">
+ <or>
+ <isset property="gluegen.build.skip.java1"/>
+ <isset property="gluegen.build.skip.java2"/>
+ </or>
+ </condition>
</target>
<target name="gluegen.build.javase">
@@ -803,9 +851,10 @@
</target>
<target name="gluegen.build.java" depends="gluegen.cpptasks.detect.os,gluegen.build.check.java" unless="gluegen.build.skip.java">
- <antcall target="generate-hash-maps" inheritRefs="true"/>
- <antcall target="gluegen.build.javase" inheritRefs="true"/>
- <antcall target="gluegen.build.android" inheritRefs="true"/>
+ <antcall target="generate-hash-maps" inheritRefs="true"/>
+ <antcall target="generate-primitive-stacks" inheritRefs="true"/>
+ <antcall target="gluegen.build.javase" inheritRefs="true"/>
+ <antcall target="gluegen.build.android" inheritRefs="true"/>
</target>
<target name="gluegen.build.check.android-launcher" depends="init">
diff --git a/make/scripts/runtest.sh b/make/scripts/runtest.sh
index 8cdf352..e7051e4 100755
--- a/make/scripts/runtest.sh
+++ b/make/scripts/runtest.sh
@@ -70,13 +70,15 @@ function onetest() {
#onetest com.jogamp.common.GlueGenVersion 2>&1 | tee -a $LOG
#onetest com.jogamp.common.util.TestSystemPropsAndEnvs 2>&1 | tee -a $LOG
#onetest com.jogamp.common.util.TestVersionInfo 2>&1 | tee -a $LOG
-onetest com.jogamp.common.util.TestVersionNumber 2>&1 | tee -a $LOG
+#onetest com.jogamp.common.util.TestVersionNumber 2>&1 | tee -a $LOG
#onetest com.jogamp.common.util.TestIteratorIndexCORE 2>&1 | tee -a $LOG
#onetest com.jogamp.common.util.locks.TestRecursiveLock01 2>&1 | tee -a $LOG
#onetest com.jogamp.common.util.locks.TestRecursiveThreadGroupLock01 2>&1 | tee -a $LOG
#onetest com.jogamp.common.util.locks.TestSingletonServerSocket00 2>&1 | tee -a $LOG
#onetest com.jogamp.common.util.locks.TestSingletonServerSocket01 2>&1 | tee -a $LOG
#onetest com.jogamp.common.util.locks.TestSingletonServerSocket02 2>&1 | tee -a $LOG
+onetest com.jogamp.common.util.TestFloatStack01 2>&1 | tee -a $LOG
+onetest com.jogamp.common.util.TestIntegerStack01 2>&1 | tee -a $LOG
#onetest com.jogamp.common.util.TestArrayHashSet01 2>&1 | tee -a $LOG
#onetest com.jogamp.common.util.IntIntHashMapTest 2>&1 | tee -a $LOG
#onetest com.jogamp.common.util.IntObjectHashMapTest 2>&1 | tee -a $LOG