mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-25 07:27:52 +01:00
Tests for add of double and float
This commit is contained in:
parent
cf55b7c52e
commit
ef26fa102d
@ -64,8 +64,18 @@ public class MathOperations {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void plus() {
|
public void addInt() {
|
||||||
rule.test( script, "plus", 1, 3 );
|
rule.test( script, "addInt", 1, 3 );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void addFloat() {
|
||||||
|
rule.test( script, "addFloat", 1F, 3.5F );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void addDouble() {
|
||||||
|
rule.test( script, "addDouble", 1.0, 3.5 );
|
||||||
}
|
}
|
||||||
|
|
||||||
static class TestClass {
|
static class TestClass {
|
||||||
@ -86,7 +96,17 @@ public class MathOperations {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Export
|
@Export
|
||||||
static int plus( int a, int b ) {
|
static int addInt( int a, int b ) {
|
||||||
|
return a + b;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Export
|
||||||
|
static float addFloat( float a, float b ) {
|
||||||
|
return a + b;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Export
|
||||||
|
static double addDouble( double a, double b ) {
|
||||||
return a + b;
|
return a + b;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user