Fix passing of some DukeScript tests

This commit is contained in:
konsoletyper 2014-10-04 17:54:56 +04:00
parent 3a475d8726
commit 71343b910e
3 changed files with 5 additions and 2 deletions

View File

@ -370,7 +370,7 @@ public class TeaVMTestTool {
innerWriter.append("\n");
innerWriter.append("\nJUnitClient.run();");
if (sourceMapsGenerated) {
String sourceMapsFileName = targetName + ".map";
String sourceMapsFileName = targetName.substring(targetName.lastIndexOf('/') + 1) + ".map";
innerWriter.append("\n//# sourceMappingURL=").append(sourceMapsFileName);
}
} else {

View File

@ -100,6 +100,7 @@
</transformers>
<debugInformationGenerated>true</debugInformationGenerated>
<sourceMapsGenerated>true</sourceMapsGenerated>
<sourceFilesCopied>true</sourceFilesCopied>
</configuration>
</execution>
</executions>

View File

@ -164,10 +164,12 @@ public final class KnockoutFXTest extends KnockoutTCK implements Transfer {
@Override
public void loadJSON(JSONCall call) {
if (call.isJSONP()) {
throw new IllegalArgumentException("This mock does not support JSONP calls");
}
String url = call.composeURL(null);
String data = urlMap.get(url);
if (data != null) {
data = "[" + data + "]";
try {
call.notifySuccess(toJSON(new ByteArrayInputStream(data.getBytes())));
} catch (IOException e) {