Paul Fisher <[EMAIL PROTECTED]> writes:

> Again, I'd prefer that we not depend on having Sun's classes.zip
> installed.  A better way to do this would be to:
> 
> a) write code to serialize an object using GNU Classpath
> b) check to see if the serialized object works in Sun's JDK
> b) if it does, then add the code to serialize the object into a test,
> which does a compare to the serialized object.
> 
> for example:
> 
> say that foo() outputs an object containing the serialized byte string
> "1234".  If that object works in Sun's JDK, then we'd add a test to
> Classpath which did something along the lines of:
> 
> if (serialize(foo()) == "1234")
>   then Pass
>   else Fail

I have code that does this in my test cases for
Object{In,Out}putStream.  I put the serialized data into files instead
of strings though since it was easier to manager that way.

-- 
Geoff Berry

Reply via email to