[MERGE] Shelf 1 / 5: TreeTransform serialization
Robert Collins
robertc at robertcollins.net
Mon Oct 20 00:59:25 BST 2008
On Mon, 2008-10-20 at 10:13 +1100, Andrew Bennetts wrote:
> > Rather than bytes on disk, they should be testing how the serialization
> > API is used. We already have plenty of tests to ensure that using the
> > pack API produces the correct output.
> >
> > So deserialize can be exercised by passing in a manually-constructed
> > list of records. serialize can be exercised with an implementation of
> > Pack that simply creates a list of records.
> >
> > Does that seem right to you?
>
> I can't speak for John, but that approach makes sense to me.
>
> The small risk with that approach is that the way Pack serialises might
> change underneath the shelve code, and the shelve tests won't notice.
> We can either decide this isn't likely to be a real problem, or you
> could add a single “smoke test” that does exercise the full stack by
> serialising to, and/or deserialising from, bytes.
To me, I think the right thing to do is to test that the serialisation
creates a pack, by serialising and then inspecting the output file as a
pack.
Thats enough to test that packs of a specific form are being used, and
then the roundtripping tests show that it can read packs.
-Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20081020/7d8fb13c/attachment.pgp
More information about the bazaar
mailing list