mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-25 07:27:52 +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" );
|
rule.test( script, "intConst" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void floatConst() {
|
||||||
|
rule.test( script, "floatConst" );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void doubleConst() {
|
||||||
|
rule.test( script, "doubleConst" );
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void plus() {
|
public void plus() {
|
||||||
rule.test( script, "plus", 1, 3 );
|
rule.test( script, "plus", 1, 3 );
|
||||||
@ -65,6 +75,16 @@ public class MathOperations {
|
|||||||
return 42;
|
return 42;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Export
|
||||||
|
static float floatConst() {
|
||||||
|
return 42.5F;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Export
|
||||||
|
static double doubleConst() {
|
||||||
|
return 42.5;
|
||||||
|
}
|
||||||
|
|
||||||
@Export
|
@Export
|
||||||
static int plus( int a, int b ) {
|
static int plus( int a, int b ) {
|
||||||
return a + b;
|
return a + b;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user