Brian Slesinsky has posted comments on this change.
Change subject: Refactors c.g.gwt.junit to use common SerializableThrowable
& StacktraceDeobfuscator.
......................................................................
Patch Set 1:
(5 comments)
....................................................
File user/src/com/google/gwt/junit/JUnitMessageQueue.java
Line 468: Class<?> thrown = getExceptionClass(result.getException());
We're only checking for two exceptions, so it seems like this could be made
simpler by adding some methods to JUnitResult:
if (result.isAnyException()
&& !result.isException(JUnitFatalLaunchException.class) &&
!result.isException(Error.class)) {
return true;
}
(The second method can be marked @GwtIncompatible)
....................................................
File user/src/com/google/gwt/junit/JUnitShell.java
Line 1231: SerializableThrowable thrown = result.getException();
Similarly this could be:
AssertionFailedError error = result.getAssertionFailedError();
if (error != null) {
testResult.addFailure(testCase, error);
}
....................................................
File user/src/com/google/gwt/junit/server/JUnitHostImpl.java
Line 171: System.err.println("Cannot deobfucsate stack trace:");
"deobfuscate"
....................................................
File user/test/com/google/gwt/junit/client/ExpectedFailure.java
Line 37: Class<? extends ExceptionAsserter> withAsserter() default
ExceptionAsserter.class;
I think we should explain this better because it's not obvious what's going
on. The reason we don't just write a try...catch block in the test itself
is because we want to check the exception in server-side code (after it's
transmitted back to the JVM). I think that's a good test of exception
serialization but we should say what we're doing.
Also, I wonder if @GwtIncompatible on DefaultExceptionAsserter would
simplify this code at all?
....................................................
File user/test/com/google/gwt/junit/client/GWTTestCaseStackTraceTest.java
Line 38: AssertionFailedError exception = new
AssertionFailedError("stack_trace_msg");
Add comment:
// the next line should be LINE_NUMBER_1
throw new AssertionFailedError(...);
--
To view, visit https://gwt-review.googlesource.com/2290
To unsubscribe, visit https://gwt-review.googlesource.com/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I1e1021bc99ac88ea6d9d47c3d23c83e79a896213
Gerrit-PatchSet: 1
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Goktug Gokdogan <[email protected]>
Gerrit-Reviewer: Brian Slesinsky <[email protected]>
Gerrit-HasComments: Yes
--
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
---
You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.