Stuart Ballard <[EMAIL PROTECTED]> writes:

> I may be repeating something we already do, because I don't know our
> test suite in great detail (as yet ;) ).

One could write a test to do what you're describing.

> The same thing could maybe even be achieved with javap and some
> clever grepping and sedding.

I wouldn't do this -- unless you're talking about using javap on
Classpath files.  It would be better to write a test which compares
Sun's javadoc output to our classes and methods.  If I remember
correctly, downloading the javadocs does not require one to enter into
a license agreement with Sun (unlike downloading the JDK).

> There are other, similar, compatibility tests that could be made
> against the "reference implementation", for example, identity of
> serialized output (we could compare whether it is identical without
> looking at what sun's actually *is* maybe?).

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

-- 
Paul Fisher * [EMAIL PROTECTED]

Reply via email to