From c15bea7d3d5f44224bca277ab955d12aa81a4f0b Mon Sep 17 00:00:00 2001 From: Volker Berlin Date: Sat, 13 Jul 2019 15:56:34 +0200 Subject: [PATCH] more math API tests --- .../jwebassembly/runtime/MathAPI.java | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/test/de/inetsoftware/jwebassembly/runtime/MathAPI.java b/test/de/inetsoftware/jwebassembly/runtime/MathAPI.java index dc8df5e..7208144 100644 --- a/test/de/inetsoftware/jwebassembly/runtime/MathAPI.java +++ b/test/de/inetsoftware/jwebassembly/runtime/MathAPI.java @@ -54,6 +54,11 @@ public class MathAPI extends AbstractBaseTest { addParam( list, script, "exp1" ); addParam( list, script, "log1" ); addParam( list, script, "log10" ); + addParam( list, script, "cbrt8" ); + addParam( list, script, "IEEEremainder" ); + addParam( list, script, "ceil8_5" ); + addParam( list, script, "floor8_5" ); + addParam( list, script, "rint8_5" ); } rule.setTestParameters( list ); return list; @@ -125,5 +130,30 @@ public class MathAPI extends AbstractBaseTest { static double sqrt() { return Math.sqrt( 6.25 ); } + + @Export + static double cbrt8() { + return Math.cbrt( 8 ); + } + + @Export + static double IEEEremainder() { + return Math.IEEEremainder( 11, 3 ); + } + + @Export + static double ceil8_5() { + return Math.ceil( 8.5 ); + } + + @Export + static double floor8_5() { + return Math.floor( 8.5 ); + } + + @Export + static double rint8_5() { + return Math.rint( 8.5 ); + } } }