gzz-commits
[Top][All Lists]
Advanced

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

[Gzz-commits] gzz ./Makefile ./TODO test/testutil.py test/gzz...


From: Tuomas J. Lukka
Subject: [Gzz-commits] gzz ./Makefile ./TODO test/testutil.py test/gzz...
Date: Sat, 12 Oct 2002 02:36:51 -0400

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Tuomas J. Lukka <address@hidden>        02/10/12 02:36:51

Modified files:
        .              : Makefile TODO 
        test           : testutil.py 
        test/gzz/gfx/gl: basicrender.test 
Added files:
        test/gzz/gfx/gl: checkColor.py paper.test 

Log message:
        Failing test for using libpaper from java

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/Makefile.diff?tr1=1.190&tr2=1.191&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/TODO.diff?tr1=1.282&tr2=1.283&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/test/testutil.py.diff?tr1=1.19&tr2=1.20&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/test/gzz/gfx/gl/checkColor.py?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/test/gzz/gfx/gl/paper.test?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/test/gzz/gfx/gl/basicrender.test.diff?tr1=1.2&tr2=1.3&r1=text&r2=text

Patches:
Index: gzz/Makefile
diff -c gzz/Makefile:1.190 gzz/Makefile:1.191
*** gzz/Makefile:1.190  Thu Oct 10 10:11:02 2002
--- gzz/Makefile        Sat Oct 12 02:36:50 2002
***************
*** 390,399 ****
        $(JYTHON) test/test.py
  testgl::
        $(GLLIB) $(JYTHON) -Dgzzclient=gl test/test.py jni
! runtest:  # Use: make runtest TEST=gzz/vob/vobmatcher, to run a single test.
!       $(GLLIB) $(JYTHON) test/testutil.py $(DBG) test/$(TEST).test
  runtest-gl:
!       $(GLLIB) $(JYTHON) test/testutil.py -Dgzzclient=gl $(DBG) jni 
test/$(TEST).test
  run:
        $(JYTHON) Gzz.py $(DBG) -Dgzzclient=awt $(Z)
  rungl:
--- 390,399 ----
        $(JYTHON) test/test.py
  testgl::
        $(GLLIB) $(JYTHON) -Dgzzclient=gl test/test.py jni
! runtest:  # Use: make runtest TEST=test/gzz/vob/vobmatcher.test, to run a 
single test.
!       $(GLLIB) $(JYTHON) test/testutil.py $(DBG) $(TEST)
  runtest-gl:
!       $(GLLIB) $(JYTHON) test/testutil.py -Dgzzclient=gl $(DBG) jni $(TEST)
  run:
        $(JYTHON) Gzz.py $(DBG) -Dgzzclient=awt $(Z)
  rungl:
Index: gzz/TODO
diff -c gzz/TODO:1.282 gzz/TODO:1.283
*** gzz/TODO:1.282      Sat Oct 12 02:18:59 2002
--- gzz/TODO    Sat Oct 12 02:36:50 2002
***************
*** 84,90 ****
        + [GI03] libpaper NV2x paletted texture
        + [GI03] irregu animations
        + [GI03] paper animations?
-       - peg TextScrollblock. getSpan and ImageSPan x0, x1 convention
        - test: whether the Java papermill actually renders something
        - Main zz view:
              - Fix connections: currently from ul corner to ul corner
--- 84,89 ----
***************
*** 105,110 ****
--- 104,110 ----
            - speedups 
            - saving
            - merge !!!
+       - peg TextScrollblock. getSpan and ImageSPan x0, x1 convention
          - overall document about the goals and visions for the project
        - LibPaper [manuscript deadline 22.11]
            - MPEG animation-making code
Index: gzz/test/gzz/gfx/gl/basicrender.test
diff -c gzz/test/gzz/gfx/gl/basicrender.test:1.2 
gzz/test/gzz/gfx/gl/basicrender.test:1.3
*** gzz/test/gzz/gfx/gl/basicrender.test:1.2    Thu Oct 10 01:10:21 2002
--- gzz/test/gzz/gfx/gl/basicrender.test        Sat Oct 12 02:36:51 2002
***************
*** 2,38 ****
  from java.awt import Color
  from gzz.gfx.gl import GL, GLCache
  
! win = getGraphicsWindow()
! 
! print "GW: ",win
! bv = GL.createByteVector(10000)
! 
! def checkAvgColor(x, y, w, h, color):
!     # We want to give the window coords differently
!     bounds = win.window.getBounds()
!     y = bounds.height - 1 - y
!     bv.readFromBuffer_ubytes(win.window, "FRONT", x, y, w, h, "RGB")
!     r = 0.0
!     g = 0.0
!     b = 0.0
!     for i in range(0,w*h):
!       r += bv.get(3*i)
!       g += bv.get(3*i+1)
!       b += bv.get(3*i+2)
!     r /= w*h
!     g /= w*h
!     b /= w*h
! 
!     msg = str((color, (r,g,b)))
! 
!     failUnlessApprox(10, color[0], r, msg)
!     failUnlessApprox(10, color[1], g, msg)
!     failUnlessApprox(10, color[2], b, msg)
! 
!       
  
  def testBgTriangle():
!     vs = win.createVobScene()
      vs.map.put(SolidBgVob(Color.red))
      vs.map.put(GLCache.getCallList("""
        Color 0 1 0
--- 2,11 ----
  from java.awt import Color
  from gzz.gfx.gl import GL, GLCache
  
! execfile("test/gzz/gfx/gl/checkColor.py")
  
  def testBgTriangle():
!     vs = getvs()
      vs.map.put(SolidBgVob(Color.red))
      vs.map.put(GLCache.getCallList("""
        Color 0 1 0
***************
*** 43,51 ****
        Vertex 200 100
        End
      """))
!     vs.coords.renderInterp(win, vs.map, None, None, 0, 1, 1)
!     checkAvgColor(10, 10, 2, 2, (255, 0, 0))
!     checkAvgColor(110, 110, 2, 2, (0, 255, 0))
  
  
  
--- 16,24 ----
        Vertex 200 100
        End
      """))
!     render(vs)
!     checkAvgColor(10, 10, 2, 2, (255, 0, 0), 2)
!     checkAvgColor(110, 110, 2, 2, (0, 255, 0), 2)
  
  
  
Index: gzz/test/testutil.py
diff -c gzz/test/testutil.py:1.19 gzz/test/testutil.py:1.20
*** gzz/test/testutil.py:1.19   Thu Oct 10 01:10:21 2002
--- gzz/test/testutil.py        Sat Oct 12 02:36:51 2002
***************
*** 70,75 ****
--- 70,77 ----
  faildefs = compile("""
  def failUnlessApprox(delta, first, second, msg = None):
      unittestObject.failUnless(abs(first-second) <= delta, msg)
+ def failIfApprox(delta, first, second, msg = None):
+     unittestObject.failIf(abs(first-second) <= delta, msg)
  def failUnlessEqual(first, second, msg = None):
      unittestObject.failUnlessEqual(first, second, msg)
  def failIf(expr, msg = None):




reply via email to

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