gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] libvob org/nongnu/libvob/util/dbg.py test/testu...


From: Tuomas J. Lukka
Subject: [Gzz-commits] libvob org/nongnu/libvob/util/dbg.py test/testu...
Date: Mon, 10 Mar 2003 14:29:19 -0500

CVSROOT:        /cvsroot/libvob
Module name:    libvob
Changes by:     Tuomas J. Lukka <address@hidden>        03/03/10 14:29:19

Modified files:
        org/nongnu/libvob/util: dbg.py 
        test           : testutil.py 
        test/tools     : gfx.py 
Added files:
        test           : demo.test 

Log message:
        Can run non-graphical tests

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/org/nongnu/libvob/util/dbg.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/test/demo.test?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/test/testutil.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/libvob/libvob/test/tools/gfx.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text

Patches:
Index: libvob/org/nongnu/libvob/util/dbg.py
diff -u libvob/org/nongnu/libvob/util/dbg.py:1.1 
libvob/org/nongnu/libvob/util/dbg.py:1.2
--- libvob/org/nongnu/libvob/util/dbg.py:1.1    Mon Mar 10 14:19:36 2003
+++ libvob/org/nongnu/libvob/util/dbg.py        Mon Mar 10 14:29:17 2003
@@ -29,12 +29,9 @@
 
 # java imports 
 from java.lang import System
+import java
 
-# gzz imports
-import gzz
-from gzz.gfx.gl import GL, GLRen
-
-debugger = gzz.util.Dbg()
+from org.nongnu.libvob.gl import GL, GLRen
 
 short = "d:G:D:"
 long = ["--dbg=", "--gldbg="]
@@ -44,7 +41,8 @@
 
 def option(o,a):
     if o in ("-d", "--dbg"):
-        debugger.debugClass(a, 1)
+       cls = java.lang.Class.forName(a)
+       cls.dbg = 1
     elif o in ("-G", "--gldbg"):
         GL.loadLib()
         print "Setting GL debug ",a
Index: libvob/test/testutil.py
diff -u libvob/test/testutil.py:1.1 libvob/test/testutil.py:1.2
--- libvob/test/testutil.py:1.1 Mon Mar 10 14:19:37 2003
+++ libvob/test/testutil.py     Mon Mar 10 14:29:18 2003
@@ -50,7 +50,7 @@
 
 class Result_SaveImage(unittest._TextTestResult):
     def startTest(self, test):
-        from test.tools import gfx
+        import test.tools.gfx as gfx
         gfx.didRender = 0
         unittest._TextTestResult.startTest(self, test)
     def addError(self, test, err):
@@ -247,14 +247,13 @@
 if __name__ == '__main__':
     sys.path.insert(0, ".")
     import getopt
-    import gzz.util.dbg
     opts, args = getopt.getopt(sys.argv[1:], 
-            gzz.util.dbg.short + "f:", 
-            gzz.util.dbg.long + ["--allowfail="])
+            vob.util.dbg.short + "f:", 
+            vob.util.dbg.long + ["--allowfail="])
     for o,a in opts:
         print "Opt: ",o,a
-        if o in gzz.util.dbg.all:
-            gzz.util.dbg.option(o,a)
+        if o in vob.util.dbg.all:
+            vob.util.dbg.option(o,a)
         elif o in ("-f", "--allowfail"):
             if a == "*":
                 runfail = ["GL", "AWT", "*"]
@@ -283,7 +282,7 @@
                 print "\n".join(l)
             print "Calling system.exit"
             java.lang.System.exit(0)
-    GraphicsAPI.getInstance().startUpdateManager(Starter())
+    vob.GraphicsAPI.getInstance().startUpdateManager(Starter())
 
 
 
Index: libvob/test/tools/gfx.py
diff -u libvob/test/tools/gfx.py:1.1 libvob/test/tools/gfx.py:1.2
--- libvob/test/tools/gfx.py:1.1        Mon Mar 10 14:19:37 2003
+++ libvob/test/tools/gfx.py    Mon Mar 10 14:29:19 2003
@@ -24,29 +24,25 @@
 from jarray import array, zeros
 
 from java.awt import Color
-from gzz.vob import *
-from gzz.vob.vobs import *
-import gzz
-
-print "Init test.gfx"
-print dir(gzz)
-print dir(gzz.client)
+
+from org.nongnu import libvob as vob
 
 _didRender = 0
 
-_realwin = gzz.client.GraphicsAPI.getInstance().createWindow()
+_realwin = vob.GraphicsAPI.getInstance().createWindow()
 _realwin.setLocation(0, 0, 600, 600)
 
-if gzz.client.GraphicsAPI.getInstance().getTypeString() == "gl":
-    from gzz.gfx.gl import GL
+if vob.GraphicsAPI.getInstance().getTypeString() == "gl":
+    GL = vob.gl.GL
+    GLRen = vob.gl.GLRen
+    GLCache = vob.gl.GLCache
     if GL.workaroundStupidBuggyAtiDrivers:
        # Sorry, ATI doesn't let us use pbuffers on R300 except in FireGL.
        # Because of that, don't put another window in front when using
        # this.
        win = _realwin
     else:
-       win = gzz.client.GraphicsAPI.getInstance().createStableOffscreen(500, 
500)
-       from gzz.gfx.gl import GL, GLCache, GLRen
+       win = vob.GraphicsAPI.getInstance().createStableOffscreen(500, 500)
        _buf = GL.createByteVector(500*500*3)
        _drawbufvs = _realwin.createVobScene()
        _drawbufvs.map.put(SolidBgVob(Color(0, 0, 0.2)))
@@ -146,19 +142,3 @@
        if abs(dst[i]-dstlist[i]) > delta:
            raise str([srclist, dstlist, dst, i, dst[i], dstlist[i]])
 
-
-class CellInBox_ConstFlat(gzz.view.CellView):
-    """A CellInBox that places white rectbgvobs of constant size.
-    """
-    bgv = gzz.vob.vobs.RectBgVob()
-    def __init__(self, w, h):
-       self.w = w
-       self.h = h
-       print "CBCF init"
-    def getSize(self, *args):
-       args[-1][0] = self.w
-       args[-1][1] = self.h
-       print "CBCF getsize",args
-    def place(self, cell, vs, box, context):
-       print "Place: ", box
-       vs.map.put(self.bgv, vs.unitSqCS(box, "U"))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]