TCK passes some more tests

This commit is contained in:
konsoletyper 2014-02-28 14:16:23 +04:00
parent ce4f6dc5d5
commit cc8d2b8903
2 changed files with 8 additions and 2 deletions

View File

@ -21,7 +21,7 @@ $rt_compare = function(a, b) {
return a > b ? 1 : a < b ? -1 : 0; return a > b ? 1 : a < b ? -1 : 0;
} }
$rt_isInstance = function(obj, cls) { $rt_isInstance = function(obj, cls) {
return obj != null && $rt_isAssignable(obj.constructor, cls); return obj != null && obj.constructor.$meta && $rt_isAssignable(obj.constructor, cls);
} }
$rt_isAssignable = function(from, to) { $rt_isAssignable = function(from, to) {
if (from === to) { if (from === to) {

View File

@ -42,6 +42,7 @@
*/ */
package org.teavm.html4j.test; package org.teavm.html4j.test;
import java.io.ByteArrayInputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.net.URI; import java.net.URI;
@ -166,7 +167,12 @@ public final class KnockoutFXTest extends KnockoutTCK implements Transfer {
String url = call.composeURL(null); String url = call.composeURL(null);
String data = urlMap.get(url); String data = urlMap.get(url);
if (data != null) { if (data != null) {
call.notifySuccess(data); data = "[" + data + "]";
try {
call.notifySuccess(toJSON(new ByteArrayInputStream(data.getBytes())));
} catch (IOException e) {
call.notifyError(e);
}
} else { } else {
call.notifyError(new IllegalStateException()); call.notifyError(new IllegalStateException());
} }