gzz-commits
[Top][All Lists]
Advanced

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

[Gzz-commits] gzz/lava/test/gzz/loom SimpleView.test


From: Benja Fallenstein
Subject: [Gzz-commits] gzz/lava/test/gzz/loom SimpleView.test
Date: Sat, 22 Feb 2003 05:40:03 -0500

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Benja Fallenstein <address@hidden>      03/02/22 05:40:03

Modified files:
        lava/test/gzz/loom: SimpleView.test 

Log message:
        test actual node positions

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/lava/test/gzz/loom/SimpleView.test.diff?tr1=1.5&tr2=1.6&r1=text&r2=text

Patches:
Index: gzz/lava/test/gzz/loom/SimpleView.test
diff -u gzz/lava/test/gzz/loom/SimpleView.test:1.5 
gzz/lava/test/gzz/loom/SimpleView.test:1.6
--- gzz/lava/test/gzz/loom/SimpleView.test:1.5  Sat Feb 22 05:11:16 2003
+++ gzz/lava/test/gzz/loom/SimpleView.test      Sat Feb 22 05:40:03 2003
@@ -20,6 +20,7 @@
 #
 
 import gzz, java
+from test.tools.gfx import getvs
 from com.hp.hpl.mesa.rdf import jena
 
 model = jena.mem.ModelMem()
@@ -36,3 +37,18 @@
 
     vs = getvs()
     view.render(vs, 0, r, s)
+
+    cs_r, cs_s, cs_t = [vs.matcher.getCS(0, x) for x in (r,s,t)]
+    
+    pr, ps, pt = [vs.coords.transformPoint(cs, 0, 0, None)
+                  for cs in [cs_r, cs_s, cs_t]]
+
+    assert ps.x > pr.x
+    assert pt.x > pr.x
+
+    # s and t should be same size and on a single vertical line
+    assert ps.x == pt.x
+
+    # s should be approx. the same height as r,
+    # while t is above or below
+    assert abs(ps.y-pr.y) < abs(pt.y-pr.y)




reply via email to

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