Hi all. I just ported the Mauve Project (http://www.sourceware.org/mauve/) test framework and Java compatibility tests to GWT :
http://code.google.com/p/gwtmauve/
I have ported java.lang and java.util mauve compatibility tests and developed a small html report application that runs all the tests with results and links to the tests sources:
http://cancerbero.vacau.com/gwt/gwtMauve/
I had to comment those parts of mauve sources that test parts of the JRE emulation that are not supported by GWT (https://developers.google.com/web-toolkit/doc/latest/RefJreEmulation).
Note that it can break your browser. I compiled it using compiler style pretty for easy debugging JavaScript errors in the client.I'm testing in firefox .
It is interesting to know that almost no errors are reported when using the GWT devmode. But a lot of errors are reported when running the tests in production mode.
I think thanks to gwtmauve many bugs in the GWT JRE emulation can be found. I myself just discovered what seems the following GWT bugs , only testing today:
* new StringBuffer(null) should throw a NPE
* "abcd".charAt(-1) and "abcd".charAt(4); should throw a indexoutofboundsexception
* "hello".substring(-1); and "hello".substring(22); b.substring(4, b.length() + 1); and b.substring(4, -1); all should throw a indexoutofboundsexception
* String.CASE_INSENSITIVE_ORDER instanceof Serializable should be true
* String.compareTo and new String() bug:
int result = "abc\tABC 123".compareTo(new String());
/* notice: "abc\tABC 123".compareTo("") will work ! */
if (result != 11)
Window.alert("error, result : " + result);
else
Window.alert("OK, result: " + result);
Well, I hope this can be useful to those who want to find and fix GWT bugs and also to know which parts of the GWT JRE emulation are "more broken" in production mode. Use it as you like. Had to release it under gpl3 for respecting mauve sources license. Comments and ideas are most welcome. Regards
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment