On Thu, Mar 3, 2011 at 3:27 PM, <[email protected]> wrote:
This works out great for TypeOracleMediatorFromByteCodeTest, but when
we
compile from source in TypeOracleMediatorFromSourceTest, the place we
need to get in to modify the Type Oracle instance is nested inside of
CompilationState which is also nested inside of
CompilationStateBuilder.
 That means disruption to these other two classes.  Seems like the
test
would be even more intrusive if I did that - what do you think?

I have a solution for you!

In TypeOracleMediatorFromSourceTest.buildTypeOracle(), you have a chance
to mess with the type oracle before you run the checks.  So here is
where you'd inject your call to
typeOracle.setupHackyAlternateJsoClassForTesting(...).

Have the implementation of setupHackyAlternateJsoClassForTesting() do


http://gwt-code-reviews.appspot.com/1369805/diff/3006/dev/core/test/com/google/gwt/dev/javac/TypeOracleMediatorTestBase.java
File
dev/core/test/com/google/gwt/dev/javac/TypeOracleMediatorTestBase.java
(right):

http://gwt-code-reviews.appspot.com/1369805/diff/3006/dev/core/test/com/google/gwt/dev/javac/TypeOracleMediatorTestBase.java#newcode219
dev/core/test/com/google/gwt/dev/javac/TypeOracleMediatorTestBase.java:219:
// caching strategy that involves the TypeOracle.
Use multiline comment.

http://gwt-code-reviews.appspot.com/1369805/diff/3006/dev/core/test/com/google/gwt/dev/javac/mediatortest/JavaScriptObjectCommonInterfaceImpl.java
File
dev/core/test/com/google/gwt/dev/javac/mediatortest/JavaScriptObjectCommonInterfaceImpl.java
(right):

http://gwt-code-reviews.appspot.com/1369805/diff/3006/dev/core/test/com/google/gwt/dev/javac/mediatortest/JavaScriptObjectCommonInterfaceImpl.java#newcode1
dev/core/test/com/google/gwt/dev/javac/mediatortest/JavaScriptObjectCommonInterfaceImpl.java:1:
package com.google.gwt.dev.javac.mediatortest;
Oh yeah, don't forget copy headers.

http://gwt-code-reviews.appspot.com/1369805/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to