harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Hindess" <mark.hind...@googlemail.com>
Subject should strings in exceptions match the reference implementation?
Date Sat, 15 Apr 2006 20:44:15 GMT
Another thing that came up when looking at PatternSyntaxExceptionTest
(HARMONY-352) was that the test was testing for the strings in
exceptions.  Since these were testing for strings not in the exceptions
thrown by the new implementation (nor by the reference
implementation), I thought about removing the tests and just ignoring
the strings.  But then...

I remembered that two days ago I had solved a problem with tests
failing on our windows build machine [0], by doing a google search for
the exact string in the exception that was being thrown.  It would
have been much harder to solve if the string didn't match the string
thrown by the reference implementation.  So, I think we should try to
match strings in exceptions because it will help our users when trying
to debug problems.  Currently we don't in very many cases.

What do other people think?

Obviously we will have to match them if we are going to test for them
in our API tests or they wont pass when run against a reference

My patch for the PatternSyntaxExceptionTest has the string tests with
the expected values set to the values from the exceptions trhown by
the RI.  But I've commented them out since harmony strings don't
currently match and since the strings probably should have different
line endings on different platforms.


[0] SystemRoot not being set in the environment when called from my
    ant task.

Mark Hindess <mark.hindess@googlemail.com>
IBM Java Technology Centre, UK.

Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org

View raw message