Wednesday, February 13, 2019

Re: Testing emulated jre classes

What should to go into src/test/super?

This can be used to super source classes for GWT compiler that you only use within GwtTestCase and not in your normal app code, e.g. some test library that only works with GWT if you super source some classes.

As a little extreme example you can take a look at GWT SDK itself which also uses test super sources. For example GWT SDK has a Java8Test class that should test the GWT compiler in terms of Java 8 language features like lambdas. But back in the day when this test had been created, GWT SDK was still compiled using Java 1.6. So adding a test with Java 8 language features would have failed to compile using javac. To solve this issue the whole test is just an empty placeholder and has been super sourced for GWT (and that super sourced class excluded from javac). That super sourced class has the actual tests.

The test visible to javac:

The super sourced test visible to GWT compiler and thus the real GwtTestCase that will be executed:

-- J.

You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment