Friday, October 5, 2012

Re: super-source and eclipse


On Friday, October 5, 2012 8:52:50 PM UTC+2, Abraham Lin wrote:
On Friday, October 5, 2012 1:46:54 PM UTC-4, Thomas Broyer wrote:
It's not only about client vs. server, it also affects non-GWTTestCase unit tests of your client code.
 
This doesn't seem right. Given that your client classes will be relying on the super-sourced logic at runtime, why shouldn't the tests utilize the same logic as well? There are almost certainly going to be slight differences between the original non-translatable classes and the super-sourced equivalents, so I'm not seeing why the tests would be structured to make use of the former when the fully-compiled code makes use of the latter. In the best case, the two have the exact same semantics. and it doesn't matter which one you use. But in the general case, the two are not quite the same, so it would seem to make more sense to depend on the version that will actually be in use at runtime.

You can have the same test run in both modes: JRE which is very fast, and GWT which is painfully slow. com.google.gwt.regexp, com.google.gwt.typedarrays, com.google.gwt.safehtml are things you can use in both modes; that way you can test your business logic with a fast JRE test, and once in a while (e.g. on the CI server) confirm that it'll run in the browser with a slow GWT test. The same goes for your own emulated things: unit-test them (in both modes), then use them (and unit-test that code in JRE mode only, or in both mode; but developers don't have to pay the slow GWTTestCase tax and can still run tests on their own machines, fast)

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/GbzUim6XVHgJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate