mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-15 02:44:47 +01:00
tests for float and double constants
This commit is contained in:
parent
0328322724
commit
f7b2cd5fd8
@ -53,6 +53,16 @@ public class MathOperations {
|
||||
rule.test( script, "intConst" );
|
||||
}
|
||||
|
||||
@Test
|
||||
public void floatConst() {
|
||||
rule.test( script, "floatConst" );
|
||||
}
|
||||
|
||||
@Test
|
||||
public void doubleConst() {
|
||||
rule.test( script, "doubleConst" );
|
||||
}
|
||||
|
||||
@Test
|
||||
public void plus() {
|
||||
rule.test( script, "plus", 1, 3 );
|
||||
@ -65,6 +75,16 @@ public class MathOperations {
|
||||
return 42;
|
||||
}
|
||||
|
||||
@Export
|
||||
static float floatConst() {
|
||||
return 42.5F;
|
||||
}
|
||||
|
||||
@Export
|
||||
static double doubleConst() {
|
||||
return 42.5;
|
||||
}
|
||||
|
||||
@Export
|
||||
static int plus( int a, int b ) {
|
||||
return a + b;
|
||||
|
Loading…
x
Reference in New Issue
Block a user