mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-25 15:37:52 +01:00
Adapt the expected error message for node.
This commit is contained in:
parent
3ab57b3804
commit
fa1fd6062b
@ -55,7 +55,13 @@ public class RuntimeErrors {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void longReturn() {
|
public void longReturn() {
|
||||||
assertEquals( "TypeError: cannot pass i64 to or from JS", rule.evalWasm( script, "longReturn" ) );
|
String error = rule.evalWasm( script, "longReturn" );
|
||||||
|
int newlineIdx = error.indexOf( '\n' );
|
||||||
|
if( newlineIdx > 0 ) {
|
||||||
|
error = error.substring( 0, newlineIdx );
|
||||||
|
}
|
||||||
|
String expected = script == ScriptEngine.SpiderMonkey ? "TypeError: cannot pass i64 to or from JS" : "TypeError: invalid type";
|
||||||
|
assertEquals( expected, error );
|
||||||
}
|
}
|
||||||
|
|
||||||
static class TestClass {
|
static class TestClass {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user