mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-15 02:44:47 +01:00
test for interface calls
This commit is contained in:
parent
800edc837d
commit
674eb84129
@ -58,6 +58,6 @@ class WasmCallInterfaceInstruction extends WasmCallInstruction {
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public void writeTo( @Nonnull ModuleWriter writer ) throws IOException {
|
||||
throw new WasmException( "Interface calls not supported", getLineNumber() );
|
||||
throw new WasmException( "Interface calls are not supported.", getLineNumber() );
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,9 @@ import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
@ -111,4 +113,18 @@ public class RuntimeErrors {
|
||||
run.run();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void interfaceCall() throws IOException {
|
||||
compileErrorTest( "Interface calls are not supported.", InterfaceMethod.class );
|
||||
}
|
||||
|
||||
static class InterfaceMethod {
|
||||
@Export
|
||||
static int runnable() {
|
||||
List list = new ArrayList();
|
||||
return list.size();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user