[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz ./TODO test/gzz/gfx/jni/jnistrconv.test gfx...
From: |
Asko Soukka |
Subject: |
[Gzz-commits] gzz ./TODO test/gzz/gfx/jni/jnistrconv.test gfx... |
Date: |
Thu, 14 Nov 2002 09:51:39 -0500 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Asko Soukka <address@hidden> 02/11/14 09:51:39
Modified files:
. : TODO
test/gzz/gfx/jni: jnistrconv.test
gfx/jni : GzzGL-jni.cxx
gzz/gfx/gl : GL_Testing.java
Log message:
Null-string-bug fix confirmed, removing failing test
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/TODO.diff?tr1=1.393&tr2=1.394&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/test/gzz/gfx/jni/jnistrconv.test.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/jni/GzzGL-jni.cxx.diff?tr1=1.63&tr2=1.64&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/gfx/gl/GL_Testing.java.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
Patches:
Index: gzz/TODO
diff -u gzz/TODO:1.393 gzz/TODO:1.394
--- gzz/TODO:1.393 Thu Nov 14 02:41:56 2002
+++ gzz/TODO Thu Nov 14 09:51:38 2002
@@ -185,16 +185,15 @@
+ speed up tests: currently too much execfile().. could
pre-compile and exec compiled in the same globals().
humppake:
- + rethink interfaces between PlainVanishing and VobScene
+ - rethink interfaces between PlainVanishing and VobScene
+ eg. correct implementation of LollipopCellVobFactor needs
+ to affect connections' coordsys (through box?)
- first have to understand current interfaces :)
- new PEG
- UMLs would be good
- more about PEG1018 - generalizing VobVanishingClient
- + correct implementation of LollipopCellVobFactor needs
- to change connections' coordsys through Box
- - make LollipopCellVobFactory use fixed dimensions for ball
- * use the box
- CellVobFactors should be renamed to CellViews
+ - finish LollipopCellVobFactory (LollipopCellView)
+ fix the way nonlinearity of coordsys is handled.
Needs a slightly better approach, with also
direction of nonlinearity taken into account.
Index: gzz/gfx/jni/GzzGL-jni.cxx
diff -u gzz/gfx/jni/GzzGL-jni.cxx:1.63 gzz/gfx/jni/GzzGL-jni.cxx:1.64
--- gzz/gfx/jni/GzzGL-jni.cxx:1.63 Wed Nov 13 17:48:56 2002
+++ gzz/gfx/jni/GzzGL-jni.cxx Thu Nov 14 09:51:39 2002
@@ -1,5 +1,3 @@
-
-#include <cstring>
#include <vector>
#include "gzz_gfx_gl_GL.h"
@@ -106,101 +104,6 @@
return env->NewStringUTF(stdstr.c_str());
}
-/** Converts jstring to unistring _without_ asking
- * string length from JNIEnv. This could have been
- * the non-null-string bug, Benja founded.
- *
- * Anyway, these can be dropped, when cleaning Gzz-Gl-jni
- * and this is considered to be irrelevant.
- */
-/** And this specialization of char_traits propably does
- not belong to here, but it exists only for this
- non-null-string bug test. */
-namespace std {
- template<>
- struct char_traits<unsigned short>
- {
- typedef unsigned short char_type;
- typedef int int_type;
- typedef streampos pos_type;
- typedef streamoff off_type;
- typedef mbstate_t state_type;
-
- static void
- assign(char_type& __c1, const char_type& __c2)
- { __c1 = __c2; }
-
- static bool
- eq(const char_type& __c1, const char_type& __c2)
- { return __c1 == __c2; }
-
- static bool
- lt(const char_type& __c1, const char_type& __c2)
- { return __c1 < __c2; }
-
- static int
- compare(const char_type* __s1, const char_type* __s2, size_t __n)
- { return memcmp(__s1, __s2, __n*2); }
-
- static size_t
- length(const char_type* __s) {
- size_t count = 0;
- while (__s[count] != '\0') count++;
- return count;
- }
-
- static const char_type*
- find(const char_type* __s, size_t __n, const char_type& __a)
- { return static_cast<const char_type*>(memchr(__s, __a, __n*2)); }
-
- static char_type*
- move(char_type* __s1, const char_type* __s2, size_t __n)
- { return static_cast<char_type*>(memmove(__s1, __s2, __n*2)); }
-
- static char_type*
- copy(char_type* __s1, const char_type* __s2, size_t __n)
- { return static_cast<char_type*>(memcpy(__s1, __s2, __n*2)); }
-
- static char_type*
- assign(char_type* __s, size_t __n, char_type __a)
- { return static_cast<char_type*>(memset(__s, __a, __n*2)); }
-
- static char_type
- to_char_type(const int_type& __c)
- { return static_cast<char_type>(__c); }
-
- // To keep both the byte 0xff and the eof symbol 0xffffffff
- // from ending up as 0xffffffff.
- static int_type
- to_int_type(const char_type& __c)
- { return static_cast<int_type>(static_cast<unsigned char>(__c)); }
-
- static bool
- eq_int_type(const int_type& __c1, const int_type& __c2)
- { return __c1 == __c2; }
-
- static int_type
- eof() { return static_cast<int_type>(EOF); }
-
- static int_type
- not_eof(const int_type& __c)
- { return (__c == eof()) ? 0 : __c; }
- };
-}
-
-typedef std::basic_string<unsigned short> unistring;
-unistring jstr2unistr_failing(JNIEnv *env, jstring jstr) {
- const jchar *strptr = env->GetStringChars(jstr, 0);
- unistring unistr(strptr);
- env->ReleaseStringChars(jstr, strptr);
- return unistr;
-}
-jstring unistr2jstr_failing(JNIEnv *env, unistring unistr) {
- return env->NewString(&(unistr[0]), unistr.size());
-}
-/** **/
-
-
Os::Window *getWindowByWID(int wid) {
return (wid<0 ? defaultWindow : windows.get(wid));
}
@@ -338,17 +241,6 @@
(JNIEnv *env, jobject obj, jstring jstr) {
return (jdouble) atof(jstr2stdstr(env, jstr).c_str());
}
-
-
-/** Tests convert jstring to unistring _without_ asking
- * string length from JNIEnv.
- */
-JNIEXPORT jstring JNICALL Java_gzz_gfx_gl_GL_1Testing_loopUnistrConvFailing
-(JNIEnv *env, jobject obj, jstring jstr) {
- return unistr2jstr_failing(env, jstr2unistr_failing(env, jstr));
-}
-/** **/
-
JNIEXPORT jint JNICALL Java_gzz_gfx_gl_GL_init
(JNIEnv *env, jclass, jint) {
Index: gzz/gzz/gfx/gl/GL_Testing.java
diff -u gzz/gzz/gfx/gl/GL_Testing.java:1.4 gzz/gzz/gfx/gl/GL_Testing.java:1.5
--- gzz/gzz/gfx/gl/GL_Testing.java:1.4 Wed Nov 13 06:23:27 2002
+++ gzz/gzz/gfx/gl/GL_Testing.java Thu Nov 14 09:51:39 2002
@@ -25,11 +25,4 @@
static public native String loopUnistrConv(String str);
static public native String loopStdstrConv(String str);
static public native double useAtof(String str);
-
- /** Tests Convert jstring to unistring _without_ asking
- * string length from JNIEnv.
- */
- static public native String loopUnistrConvFailing(String str);
- /** **/
-
}
Index: gzz/test/gzz/gfx/jni/jnistrconv.test
diff -u gzz/test/gzz/gfx/jni/jnistrconv.test:1.8
gzz/test/gzz/gfx/jni/jnistrconv.test:1.9
--- gzz/test/gzz/gfx/jni/jnistrconv.test:1.8 Wed Nov 13 06:21:53 2002
+++ gzz/test/gzz/gfx/jni/jnistrconv.test Thu Nov 14 09:51:39 2002
@@ -3,15 +3,6 @@
from gzz.gfx.gl import GL_Testing
import java.lang.String
-def testUniScandJavaSubstr_without_stringlength():
- str = java.lang.String("Viime yönä Åke jutteli Äreälle Örisijälle
åskardeista.")
- failIf(str.substring(5,20) !=
GL_Testing.loopUnistrConvFailing(str.substring(5,20)),
- "["+str.substring(5,20)+"] != \
-["+GL_Testing.loopUnistrConvFailing(str.substring(5,20))+"]\n\
-Substring of phrase using scandinavian chraracters corrupted \
-during unistring conversion. The non-null-string bug propably detected. \
-If the other conversion tests are ok, this is fixed.")
-
def testUniAZ():
str = "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz"
failIf(str != GL_Testing.loopUnistrConv(str),
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz-commits] gzz ./TODO test/gzz/gfx/jni/jnistrconv.test gfx...,
Asko Soukka <=