[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz gzz/impl/PlainCellManager.java gzz/zzutil/I...
From: |
Benja Fallenstein |
Subject: |
[Gzz-commits] gzz gzz/impl/PlainCellManager.java gzz/zzutil/I... |
Date: |
Tue, 17 Sep 2002 14:56:42 -0400 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Benja Fallenstein <address@hidden> 02/09/17 14:56:41
Modified files:
gzz/impl : PlainCellManager.java
gzz/zzutil : Ids.java
test/gzz : content.py dim.py
test/gzz/index/impl: xuindexer.test
Log message:
test delete and make it work; implement SpaceXuIndexer
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/impl/PlainCellManager.java.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/zzutil/Ids.java.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/test/gzz/content.py.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/test/gzz/dim.py.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/test/gzz/index/impl/xuindexer.test.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
Patches:
Index: gzz/gzz/impl/PlainCellManager.java
diff -c gzz/gzz/impl/PlainCellManager.java:1.4
gzz/gzz/impl/PlainCellManager.java:1.5
*** gzz/gzz/impl/PlainCellManager.java:1.4 Wed Jul 17 04:59:36 2002
--- gzz/gzz/impl/PlainCellManager.java Tue Sep 17 14:56:41 2002
***************
*** 26,38 ****
import gzz.*;
import gzz.util.*;
import gzz.errors.*;
! import java.util.Set;
/** A CellManager which uses the class Cell directly, and where
* all cells exist. Cell ids are generated using a RandomNamespace
*/
public class PlainCellManager extends AbstractCellManager {
! public static final String rcsid = "$Id: PlainCellManager.java,v 1.4
2002/07/17 08:59:36 tjl Exp $";
RandomNamespace namespace = new RandomNamespace();
--- 26,38 ----
import gzz.*;
import gzz.util.*;
import gzz.errors.*;
! import java.util.*;
/** A CellManager which uses the class Cell directly, and where
* all cells exist. Cell ids are generated using a RandomNamespace
*/
public class PlainCellManager extends AbstractCellManager {
! public static final String rcsid = "$Id: PlainCellManager.java,v 1.5
2002/09/17 18:56:41 benja Exp $";
RandomNamespace namespace = new RandomNamespace();
***************
*** 47,52 ****
--- 47,58 ----
return true;
}
public void delete(Cell c) {
+ for(Iterator i=space.getDims().iterator(); i.hasNext();) {
+ Dim d = (Dim)i.next();
+ d.excise(c);
+ }
+
+ space.getCellTexter().setText(c, "");
}
}
Index: gzz/gzz/zzutil/Ids.java
diff -c gzz/gzz/zzutil/Ids.java:1.4 gzz/gzz/zzutil/Ids.java:1.5
*** gzz/gzz/zzutil/Ids.java:1.4 Tue Sep 17 11:55:29 2002
--- gzz/gzz/zzutil/Ids.java Tue Sep 17 14:56:41 2002
***************
*** 23,29 ****
import gzz.*;
import gzz.errors.*;
! /** Important cell and dimension ids. XXX make URIs
*/
public class Ids {
--- 23,29 ----
import gzz.*;
import gzz.errors.*;
! /** Important cell and dimension ids.
*/
public class Ids {
***************
*** 44,50 ****
public static String d_2 =
"urn:urn-5:0000000008000000E7C2E550C700043E3EC208FC03C2F68A854DA58908F1DB16B43BC4ACD60637-32";
public static String d_3 =
"urn:urn-5:0000000008000000E7C2E550C700043E3EC208FC03C2F68A854DA58908F1DB16B43BC4ACD60637-31";
!
/** Dimension for xanalogical links.
* A link is three cells along d_xu_link currently: identity cell
(represents
* the link), first link set (as enfilade), second link set (as
enfilade).
--- 44,50 ----
public static String d_2 =
"urn:urn-5:0000000008000000E7C2E550C700043E3EC208FC03C2F68A854DA58908F1DB16B43BC4ACD60637-32";
public static String d_3 =
"urn:urn-5:0000000008000000E7C2E550C700043E3EC208FC03C2F68A854DA58908F1DB16B43BC4ACD60637-31";
!
/** Dimension for xanalogical links.
* A link is three cells along d_xu_link currently: identity cell
(represents
* the link), first link set (as enfilade), second link set (as
enfilade).
Index: gzz/test/gzz/content.py
diff -c gzz/test/gzz/content.py:1.5 gzz/test/gzz/content.py:1.6
*** gzz/test/gzz/content.py:1.5 Sun Aug 18 05:52:02 2002
--- gzz/test/gzz/content.py Tue Sep 17 14:56:41 2002
***************
*** 78,83 ****
--- 78,90 ----
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):
Index: gzz/test/gzz/dim.py
diff -c gzz/test/gzz/dim.py:1.7 gzz/test/gzz/dim.py:1.8
*** gzz/test/gzz/dim.py:1.7 Thu Jul 25 03:07:10 2002
--- gzz/test/gzz/dim.py Tue Sep 17 14:56:41 2002
***************
*** 1,4 ****
! #
# Copyright (c) 2002, Tuomas Lukka
#
# You may use and distribute under the terms of either the GNU Lesser
--- 1,4 ----
! #
# Copyright (c) 2002, Tuomas Lukka
#
# You may use and distribute under the terms of either the GNU Lesser
***************
*** 86,91 ****
--- 86,104 ----
for c in self.loosecells:
self.failUnlessEqual([c, None, None, None, None],
[self.dim.s(c, steps) for steps in [0,1,-1,2,-2]])
+
+ def testDelete(self):
+ """Delete must excise"""
+ c = self.cells
+ dim = self.dim
+
+ assert c[0].s(dim) == c[1]
+ assert c[1].s(dim) == c[2]
+
+ c[1].delete()
+
+ assert c[0].s(dim) == c[2]
+ assert not (c[1].s(dim) or c[1].s(dim, -1))
class TestDeltaDim(TestReadWriteDim):
# Requires attribute: space, dim.
Index: gzz/test/gzz/index/impl/xuindexer.test
diff -c gzz/test/gzz/index/impl/xuindexer.test:1.4
gzz/test/gzz/index/impl/xuindexer.test:1.5
*** gzz/test/gzz/index/impl/xuindexer.test:1.4 Tue Sep 17 12:52:58 2002
--- gzz/test/gzz/index/impl/xuindexer.test Tue Sep 17 14:56:41 2002
***************
*** 1,19 ****
! #
# Copyright (c) 2002, Tuomas J. Lukka
! #
# You may use and distribute under the terms of either the GNU Lesser
# General Public License, either version 2 of the license or,
# at your choice, any later version. Alternatively, you may use and
# distribute under the terms of the XPL.
! #
# See the LICENSE.lgpl and LICENSE.xpl files for the specific terms of
# the licenses.
! #
# This software is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the README
# file for more details.
! #
import gzz
--- 1,19 ----
! #
# Copyright (c) 2002, Tuomas J. Lukka
! #
# You may use and distribute under the terms of either the GNU Lesser
# General Public License, either version 2 of the license or,
# at your choice, any later version. Alternatively, you may use and
# distribute under the terms of the XPL.
! #
# See the LICENSE.lgpl and LICENSE.xpl files for the specific terms of
# the licenses.
! #
# This software is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the README
# file for more details.
! #
import gzz
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz-commits] gzz gzz/impl/PlainCellManager.java gzz/zzutil/I...,
Benja Fallenstein <=