[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz ./TODO ./Makefile gfx/jni/GzzGL-jni.cxx gzz...
From: |
Asko Soukka |
Subject: |
[Gzz-commits] gzz ./TODO ./Makefile gfx/jni/GzzGL-jni.cxx gzz... |
Date: |
Wed, 09 Oct 2002 02:50:28 -0400 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Asko Soukka <address@hidden> 02/10/09 02:50:26
Modified files:
. : TODO Makefile
gfx/jni : GzzGL-jni.cxx
gzz/gfx/gl : GL_Testing.java
test/gzz/gfx/jni: jnistrconv.test
test : testutil.py
Added files:
test/gzz/gfx : locale.test
Log message:
test for locale bug, JNI-tests to run only with 'make runtestjni'
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/TODO.diff?tr1=1.258&tr2=1.259&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/Makefile.diff?tr1=1.183&tr2=1.184&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/jni/GzzGL-jni.cxx.diff?tr1=1.48&tr2=1.49&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/gfx/gl/GL_Testing.java.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/test/gzz/gfx/locale.test?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/test/gzz/gfx/jni/jnistrconv.test.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/test/testutil.py.diff?tr1=1.13&tr2=1.14&r1=text&r2=text
Patches:
Index: gzz/Makefile
diff -c gzz/Makefile:1.183 gzz/Makefile:1.184
*** gzz/Makefile:1.183 Tue Oct 8 19:44:07 2002
--- gzz/Makefile Wed Oct 9 02:50:26 2002
***************
*** 390,395 ****
--- 390,397 ----
$(GLLIB) $(JYTHON) test/test.py
runtest: # Use: make runtest TEST=gzz/vob/vobmatcher, to run a single test.
$(GLLIB) $(JYTHON) test/testutil.py $(DBG) test/$(TEST).test
+ runtestjni: # In JNI-dependent test's requestJNI must be defined.
+ $(GLLIB) $(JYTHON) test/testutil.py $(DBG) jni test/$(TEST).test
run:
$(JYTHON) Gzz.py $(DBG) -Dgzzclient=awt $(Z)
rungl:
Index: gzz/TODO
diff -c gzz/TODO:1.258 gzz/TODO:1.259
*** gzz/TODO:1.258 Tue Oct 8 15:16:21 2002
--- gzz/TODO Wed Oct 9 02:50:26 2002
***************
*** 56,62 ****
these.
- porting: make sure all demos etc. work with plain mesa
humppake:
- - test/ jython test for locale problems.
- clean up Paper VP interface [jvk will explain]
- implement TexGenEmboss::setUp_explicit
- vertex_explicit() routine to work also without
--- 56,61 ----
Index: gzz/gfx/jni/GzzGL-jni.cxx
diff -c gzz/gfx/jni/GzzGL-jni.cxx:1.48 gzz/gfx/jni/GzzGL-jni.cxx:1.49
*** gzz/gfx/jni/GzzGL-jni.cxx:1.48 Mon Oct 7 10:23:11 2002
--- gzz/gfx/jni/GzzGL-jni.cxx Wed Oct 9 02:50:26 2002
***************
*** 237,242 ****
--- 237,247 ----
return stdstr2jstr(env, jstr2stdstr(env, jstr));
}
+ JNIEXPORT jdouble JNICALL Java_gzz_gfx_gl_GL_1Testing_useAtof
+ (JNIEnv *env, jobject obj, jstring jstr) {
+ return (jdouble) atof(jstr2stdstr(env, jstr).c_str());
+ }
+
JNIEXPORT jint JNICALL Java_gzz_gfx_gl_GL_init
(JNIEnv *env, jclass, jint) {
if(inited++) {
Index: gzz/gzz/gfx/gl/GL_Testing.java
diff -c gzz/gzz/gfx/gl/GL_Testing.java:1.1 gzz/gzz/gfx/gl/GL_Testing.java:1.2
*** gzz/gzz/gfx/gl/GL_Testing.java:1.1 Mon Oct 7 05:40:12 2002
--- gzz/gzz/gfx/gl/GL_Testing.java Wed Oct 9 02:50:26 2002
***************
*** 24,27 ****
--- 24,28 ----
/** Exists for testing string conversions through JNI. */
static public native String loopUnistrConv(String str);
static public native String loopStdstrConv(String str);
+ static public native double useAtof(String str);
}
Index: gzz/test/gzz/gfx/jni/jnistrconv.test
diff -c gzz/test/gzz/gfx/jni/jnistrconv.test:1.3
gzz/test/gzz/gfx/jni/jnistrconv.test:1.4
*** gzz/test/gzz/gfx/jni/jnistrconv.test:1.3 Mon Oct 7 05:48:19 2002
--- gzz/test/gzz/gfx/jni/jnistrconv.test Wed Oct 9 02:50:26 2002
***************
*** 1,34 ****
from gzz.gfx.gl import GL_Testing
import java.lang.String
! def strcmp(original, looped):
! failIf(original != looped)
def testUniAZ():
str = "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz"
! strcmp(str, GL_Testing.loopUnistrConv(str))
def testUniAZPhrase():
str = "A little green fox jumped over my backyards fence."
! strcmp(str, GL_Testing.loopUnistrConv(str))
def testUniScand():
str = "ÅåÄäÖö"
! strcmp(str, GL_Testing.loopUnistrConv(str))
def testUniScandPhrase():
str = "Viime yönä Åke jutteli Äreälle Örisijälle åskardeista."
! strcmp(str, GL_Testing.loopUnistrConv(str))
def testUniScandJavaSubstr():
str = java.lang.String("Viime yönä Åke jutteli Äreälle Örisijälle
åskardeista.")
! strcmp(str.substring(5,20),
GL_Testing.loopUnistrConv(str.substring(5,20)))
def testStdAZ():
str = "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz"
! strcmp(str, GL_Testing.loopStdstrConv(str))
def testStdAZPhrase():
str = "A little green fox jumped over my backyards fence."
! strcmp(str, GL_Testing.loopStdstrConv(str))
--- 1,46 ----
from gzz.gfx.gl import GL_Testing
import java.lang.String
! def requiresJNI():
! pass
def testUniAZ():
str = "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz"
! failIf(str != GL_Testing.loopUnistrConv(str),
! "Characters corrupted during unistring conversion.")
def testUniAZPhrase():
str = "A little green fox jumped over my backyards fence."
! failIf(str != GL_Testing.loopUnistrConv(str),
! "Phrase corrupted during unistring conversion.")
def testUniScand():
str = "ÅåÄäÖö"
! failIf(str != GL_Testing.loopUnistrConv(str),
! "Scandinavian characters corrupted during unistring conversion.")
def testUniScandPhrase():
str = "Viime yönä Åke jutteli Äreälle Örisijälle åskardeista."
! failIf(str != GL_Testing.loopUnistrConv(str),
! "Phrase using scandinavian characters correupted during \
! unistring conversion.")
def testUniScandJavaSubstr():
str = java.lang.String("Viime yönä Åke jutteli Äreälle Örisijälle
åskardeista.")
! failIf(str.substring(5,20) !=
GL_Testing.loopUnistrConv(str.substring(5,20)),
! "Substring of phrase using scandinavian chraracters corrupted \
! during unistring conversion.")
def testStdAZ():
str = "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz"
! failIf(str != GL_Testing.loopStdstrConv(str),
! "Characters corrupted during std::string conversion.")
def testStdAZPhrase():
str = "A little green fox jumped over my backyards fence."
! failIf(str != GL_Testing.loopStdstrConv(str),
! "Phrase corrupted during std::string conversion.")
!
!
!
Index: gzz/test/testutil.py
diff -c gzz/test/testutil.py:1.13 gzz/test/testutil.py:1.14
*** gzz/test/testutil.py:1.13 Tue Oct 8 18:55:18 2002
--- gzz/test/testutil.py Wed Oct 9 02:50:26 2002
***************
*** 33,38 ****
--- 33,42 ----
import unittest, os.path, fnmatch, string, imp
+ true = 1
+ false = 0
+ enableJNI = false
+
def tests(files):
"""
Return a list of all *.test files in a given directory and its
***************
*** 71,76 ****
--- 75,88 ----
tests = {}
exec compiledTestFile in globals(), tests
+ try:
+ if tests.keys().index('requiresJNI') >= 0:
+ if enableJNI == false:
+ print file + " skipped: JNI required."
+ return
+ except ValueError:
+ pass
+
testnames = [t for t in tests.keys() if t.startswith('test')]
code = '''class %s(unittest.TestCase):
***************
*** 118,124 ****
omit -- files/subdirectories to avoid (defaults to empty list)
"""
return unittest.TestSuite([unittest.makeSuite(load(t))
! for t in tests(files)])
if __name__ == '__main__':
--- 130,136 ----
omit -- files/subdirectories to avoid (defaults to empty list)
"""
return unittest.TestSuite([unittest.makeSuite(load(t))
! for t in tests(files) if load(t)])
if __name__ == '__main__':
***************
*** 137,141 ****
--- 149,166 ----
gzz.util.dbg.option(o,a)
test = args
+ try:
+ if test.index('jni') >=0:
+ enableJNI = true
+ test.remove('jni')
+ except ValueError:
+ pass
unittest.TextTestRunner(verbosity=2).run(suite(test))
+
+
+
+
+
+
+
- [Gzz-commits] gzz ./TODO ./Makefile gfx/jni/GzzGL-jni.cxx gzz...,
Asko Soukka <=