gzz-commits
[Top][All Lists]
Advanced

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

[Gzz-commits] gzz/test test.py gzz/content.py gzz/rwspanconte...


From: Tuomas J. Lukka
Subject: [Gzz-commits] gzz/test test.py gzz/content.py gzz/rwspanconte...
Date: Sat, 12 Oct 2002 15:11:10 -0400

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

Modified files:
        test           : test.py 
        test/gzz       : content.py 
Added files:
        test/gzz       : rwspancontent.py rwstringcontent.py 
        test/gzz/diff  : rwspandeltacontent.py 
        test/gzz/impl  : deltavstreamcontent.test vstreamcontent.test 
Removed files:
        test/gzz       : dim.py 

Log message:
        Move more tests out

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/test/test.py.diff?tr1=1.21&tr2=1.22&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/test/gzz/rwspancontent.py?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/test/gzz/rwstringcontent.py?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/test/gzz/content.py.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/test/gzz/diff/rwspandeltacontent.py?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/test/gzz/impl/deltavstreamcontent.test?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/test/gzz/impl/vstreamcontent.test?rev=1.1

Patches:
Index: gzz/test/gzz/content.py
diff -c gzz/test/gzz/content.py:1.6 gzz/test/gzz/content.py:1.7
*** gzz/test/gzz/content.py:1.6 Tue Sep 17 14:56:41 2002
--- gzz/test/gzz/content.py     Sat Oct 12 15:11:09 2002
***************
*** 21,134 ****
  from gzz.errors import *
  import unittest
  from java import io
- 
- class TestRWStringContent(unittest.TestCase):
-     # Requires attributes:
-     # space = the space
-     # cells = sequence of cells
- 
-     # XXX Test observers!
-     # XXX Test IndexOutOfBounds!
- 
-     def testSetGet(self):
-       cells = self.cells
-       cells[0].setText("Foo")
-       cells[1].setText("Bar")
-       self.failUnlessEqual(cells[0].t(), "Foo")
-       self.failUnlessEqual(cells[1].t(), "Bar")
- 
-     def testInsertDelete(self):
-       cells = self.cells
-       def assEq(a, b):
-           self.failUnlessEqual(a, b)
-       cells[0].setText("ABCDEFGH")
-       cells[0].insertText(1, "FOO")
-       assEq(cells[0].t(), "AFOOBCDEFGH")
- 
-       cells[1].insertText(0, "FOO")
-       assEq(cells[1].t(), "FOO")
- 
-       cells[2].setText("01234")
-       cells[2].deleteText(1,3)
-       assEq(cells[2].t(), "034")
- 
-     def testCopyMove(self):
-       cells = self.cells
-       def assEq(a, b):
-           self.failUnlessEqual(a, b)
-       cells[0].setText("0123456789")
-       cells[1].moveText(0, cells[0], 1, 3)
- 
-       assEq(cells[0].t(), "03456789")
-       assEq(cells[1].t(), "12")
- 
-       cells[1].copyText(1, cells[0], 6, 7)
-       assEq(cells[0].t(), "03456789")
-       assEq(cells[1].t(), "182")
- 
-     def testClone(self):
-         c = self.cells[0]
-       c.setText("foo")
- 
-       d = c.zzclone()
-       assert c.t() == d.t() == "foo"
- 
-       c.setText("bar")
-       assert c.t() == d.t() == "bar"
- 
-       d.setText("baz")
-       assert c.t() == d.t() == "baz"
-       
-     def testDelete(self):
-         """Delete must remove contents"""
-       c = self.cells[0]
-       c.setText("foo")
-       c.delete()
-       assert not c.t()
- 
- 
- class TestRWSpanContent(TestRWStringContent):
-     def testEmptyEnfilade(self):
-         c = self.cells
-         t = c[0].space.getCellTexter();
-         e = t.getEnfilade(c[0], None)
-         assert e != None
-         assert e.makeString() == ''
-         assert c[0].t() == ''
- 
- class TestRWSpanDeltaContent(TestRWSpanContent):
-     def test_SDC_delta_ops(self):
-       c = self.cells
- 
-       def a(ind, text):
-           self.failUnlessEqual(c[ind].t(), text)
- 
-       c[0].setText("ABCDE")
-       c[1].setText("12345")
- 
-       self.space.checkpointDelta()
- 
-       c[0].insertText(1, "2")
-       c[1].deleteText(1, 2)
- 
-       a(0, "A2BCDE")
-       a(1, "1345")
- 
-       delt = self.space.checkpointDelta()
- 
-       self.space.applyDelta(delt.inverse())
- 
-       a(0, "ABCDE")
-       a(1, "12345")
- 
-       self.space.applyDelta(delt)
- 
-       a(0, "A2BCDE")
-       a(1, "1345")
- 
-       try: self.space.applyDelta(delt)
-       except InconsistentChangeException: pass
-       else: self.fail("No exception")
- 
-       #self.failUnlessRaises(InconsistentChangeException,
-       #    self.space.applyDelta, delt)
--- 21,23 ----
Index: gzz/test/test.py
diff -c gzz/test/test.py:1.21 gzz/test/test.py:1.22
*** gzz/test/test.py:1.21       Sat Oct 12 08:58:36 2002
--- gzz/test/test.py    Sat Oct 12 15:11:09 2002
***************
*** 43,59 ****
  
  import unittest
  
- 
- class TestVStreamContent(test.gzz.content.TestRWSpanContent):
-     def setUp(self):
-       self.space = apply(ModularSpace, spaceArgList())
-       self.cells = [self.space.N() for i in range(0,10)]
- 
- class TestDeltaVStreamContent(test.gzz.content.TestRWSpanDeltaContent):
-     def setUp(self):
-       self.space = apply(ModularDeltaSpace, deltaspaceArgList())
-       self.cells = [self.space.N() for i in range(0,10)]
- 
  class TestEnfilade1DImpl_Fake(test.gzz.media.enfilade.TestEnfilade):
      def setUp(self):
        self.spanMaker = FakeSpanMaker()
--- 43,48 ----




reply via email to

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