Ralph Versteegen wrote:
On 7 April 2010 13:06, Mike Caron <[email protected]> wrote:
I forgot to mention in the log, but the tests build up a tree from nothing,
with various random parameters, save it to disk, read it from disk again
into a new tree, and compare the new tree with the old one to make sure it
matches.

We can add other tests, but this covers 95% of the usage... Not tested are
[Find/Get]ChildByName and AddChild[After/Before].

[email protected] wrote:
pkmnfrk
2010-04-06 18:03:29 -0700 (Tue, 06 Apr 2010)
411
Reworking reloadtest.bas into a unit test of the key features of RELOAD
(creating documents, navigating documents, serializing and deserializing
trees, etc).

Also, minor optimization in the Node type, by sticking ->num and ->flo in
a Union together, since only one of those is valid at any given time
(depending on ->nodeType). I would have stuck ->str in there too, but for
some reason, FB doesn't like that.
---
U   wip/reload.bi
U   wip/reloadtest.bas
_______________________________________________
Ohrrpgce mailing list
[email protected]
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
--
Mike

Have you seen the reload utility functions James wrote for saving and
loading slices, in slices.bas? I think that they should be renamed,
moved, and made part of the standard RELOAD interface.

You mean the Save/LoadProp functions? Sure, that can be done. Should they be tweaked, though, to not add a new child node if the name already exists?

Duplicate nodes are not illegal, but probably, someone using a helper function like this doesn't want duplicates.
--
Mike
_______________________________________________
Ohrrpgce mailing list
[email protected]
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org

Reply via email to