X Tutup
Skip to content

Commit a1c53a1

Browse files
author
jossonsmith
committed
Fix TypeError of IE and add package.js for JUnit
1 parent 1fe4652 commit a1c53a1

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

sources/net.sf.j2s.java.junit/src/junit/framework/TestFailure.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,15 @@ public String toString() {
4141
buffer.append(fFailedTest+": "+fThrownException.getMessage());
4242
return buffer.toString();
4343
}
44+
/**
45+
* @j2sNative
46+
* var k = this.thrownException ();
47+
* if (k instanceof TypeError) {
48+
* return "TypeError:" + k.message;
49+
* } else {
50+
* return k.toString();
51+
* }
52+
*/
4453
public String trace() {
4554
if (true) return thrownException().toString();
4655
StringWriter stringWriter= new StringWriter();
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
(function () {
2+
ClazzLoader.registerPackages ("junit", [
3+
"awtui", "extensions", "framework", "runner",
4+
"swingui", "textui"]);
5+
}) ();
6+
7+
/* private */
8+
window["junit.package"] = true;

0 commit comments

Comments
 (0)
X Tutup