Boost Users :
From: Sohail Somani (sohail_at_[hidden])
Date: 2008-06-27 15:39:14
Daryle Walker wrote:
> Do I just serialize to a memory buffer, then serialize from the same
> buffer, and then compare the source and destination objects?
This is one way. You can also try executing the exact same operations on
source and destination to ensure you get the same results. This can work
(for example) when you have a class hierarchy and there is some
meaningful common ground on which to do these tests.
> use a text format (plain and/or XML) with a string-stream source/sink so
> I can check by reading? Should I make up a string of a text archive and
> have my routine try reading it?
Never use anything except what you will use in production. If you are
using binary, then use the binary archives to write to a buffer.
-- Sohail Somani http://uint32t.blogspot.com
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net