1.1 --- a/json-tck/src/main/java/net/java/html/js/tests/Bodies.java Fri Dec 13 08:49:53 2013 +0100
1.2 +++ b/json-tck/src/main/java/net/java/html/js/tests/Bodies.java Sat Dec 14 12:51:15 2013 +0100
1.3 @@ -60,4 +60,7 @@
1.4
1.5 @JavaScriptBody(args = { "arr", "i", "value" }, body = "arr[i] = value;")
1.6 public static native void modify(String[] arr, int i, String value);
1.7 +
1.8 + @JavaScriptBody(args = {}, body = "return true;")
1.9 + public static native boolean truth();
1.10 }
2.1 --- a/json-tck/src/main/java/net/java/html/js/tests/JavaScriptBodyTest.java Fri Dec 13 08:49:53 2013 +0100
2.2 +++ b/json-tck/src/main/java/net/java/html/js/tests/JavaScriptBodyTest.java Sat Dec 14 12:51:15 2013 +0100
2.3 @@ -51,6 +51,12 @@
2.4 assert r == p : "The object is the same";
2.5 }
2.6
2.7 + @KOTest public void encodingString() {
2.8 + Object p = "Ji\n\"Hi\"\nHon";
2.9 + Object r = Bodies.id(p);
2.10 + assert p.equals(r) : "The object is the same: " + p + " != " + r;
2.11 + }
2.12 +
2.13 @KOTest public void nullIsNull() {
2.14 Object p = null;
2.15 Object r = Bodies.id(p);
2.16 @@ -94,6 +100,9 @@
2.17 // assert "Hello".equals(arr[0]) : "Expecting World, but was: " + arr[0];
2.18 // }
2.19
2.20 + @KOTest public void truth() {
2.21 + assert Bodies.truth() : "True is true";
2.22 + }
2.23 private static class R implements Runnable {
2.24 int cnt;
2.25 private final Thread initThread;