[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/test/gzz/vob vobcoorder.test
From: |
Tuomas J. Lukka |
Subject: |
[Gzz-commits] gzz/test/gzz/vob vobcoorder.test |
Date: |
Fri, 01 Nov 2002 03:50:38 -0500 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Tuomas J. Lukka <address@hidden> 02/11/01 03:50:36
Modified files:
test/gzz/vob : vobcoorder.test
Log message:
Test activation of boxes. Seems to work\!
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/test/gzz/vob/vobcoorder.test.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
Patches:
Index: gzz/test/gzz/vob/vobcoorder.test
diff -u gzz/test/gzz/vob/vobcoorder.test:1.3
gzz/test/gzz/vob/vobcoorder.test:1.4
--- gzz/test/gzz/vob/vobcoorder.test:1.3 Fri Nov 1 03:37:19 2002
+++ gzz/test/gzz/vob/vobcoorder.test Fri Nov 1 03:50:36 2002
@@ -64,13 +64,36 @@
def testBoxes():
"""Test the box coordinate systems.
"""
+
+ # Test box and unitSq
cs1 = c.box(0, 200, 100)
cs2 = c.unitSq(cs1)
checkTrans(vs, cs2, [0, 0, 0, 1, 1, 1, 2, 2, 2],
[0, 0, 0, 200, 100, 1, 400, 200, 2])
- cs1 = c.orthoBox(0, 5, 200, 100, 2, 2, 10, 10)
+ # Activation:
+ # cs1 must be active in the area of the box,
+ # but nowhere else
+ c.activate(cs1)
+ failUnlessEqual(cs1, c.getCSAt(0, .5, .5, None))
+ failUnlessEqual(cs1, c.getCSAt(0, 100, 50, None))
+ failUnlessEqual(-1, c.getCSAt(0, 100, 150, None))
+ failUnlessEqual(-1, c.getCSAt(0, 250, 50, None))
+
+ # Test orthoBox and unitSq
+ cs1 = c.orthoBox(0, -5, 250, 150, 2, 2, 10, 10)
cs2 = c.unitSq(cs1)
- checkTrans(vs, cs2, [0, 0, 0, 1, 1, 1], [200, 100, 5, 220, 120, 6])
+ checkTrans(vs, cs2, [0, 0, 0, 1, 1, 1], [250, 150, -5, 270, 170, -4])
+
+ # Activation: cs1 is now on top.
+ c.activate(cs1)
+
+ failUnlessEqual(cs1, c.getCSAt(0, 250.5, 150.5, None))
+ failUnlessEqual(cs1, c.getCSAt(0, 265, 165.5, None))
+ failUnlessEqual(-1, c.getCSAt(0, 275, 165.5, None))
+ failUnlessEqual(-1, c.getCSAt(0, 265, 175.5, None))
+
+
+
# : vim: set syntax=python :
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz-commits] gzz/test/gzz/vob vobcoorder.test,
Tuomas J. Lukka <=