Boost logo

Boost :

Subject: Re: [boost] How do folks test serialization code?
From: Ryo IGARASHI (rigarash_at_[hidden])
Date: 2013-08-05 05:59:37


On Mon, Aug 5, 2013 at 8:33 AM, Robert Ramey <ramey_at_[hidden]> wrote:
>> I have some trivial tests that round trip to
>> a stringstream using boost::archive::text_i/oarchive, but of course
>> that only verifies that platform-specific serialization works. So
>> what do folks do - generate text archives on different platforms,
>> deserialize and compare?
>> How does Boost.Serialization itself verify this?
> It doesn't.
> It also doesn't explicitly test that version x can read all
> archives created with versions < x.

How about the following?

1. When new version of boost is released, add test archive file
created by the version
in the test/1.xx.x directory (in svn/git repo).
2. Try to test against all the previous archive when the full test run?

This way, we can test the inter-version compatibility.

If you want to test inter-platform, the test compares the
created archive to the archive contained in the repogitory.
(I am assuming that text archive is platform-independent.)

I think that this will be rather easily implementable and better than
nothing tested.

Best regards,


Boost list run by bdawes at, gregod at, cpdaniel at, john at