diff options
Diffstat (limited to 'test/float_ops.cpp')
-rw-r--r-- | test/float_ops.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/float_ops.cpp b/test/float_ops.cpp index ddd8bcae6..9e4d68bae 100644 --- a/test/float_ops.cpp +++ b/test/float_ops.cpp @@ -41,5 +41,33 @@ int EMSCRIPTEN_KEEPALIVE double_to_int(double d) { return x; } +int EMSCRIPTEN_KEEPALIVE double_to_uint(double d) { + d += 1.23; + unsigned x = d; + return x; +} + +float EMSCRIPTEN_KEEPALIVE int_to_float(int x) { + float d = x; + return d + 1.23; +} + +float EMSCRIPTEN_KEEPALIVE uint_to_float(unsigned x) { + float d = x; + return d + 1.23; +} + +int EMSCRIPTEN_KEEPALIVE float_to_int(float d) { + d += 1.23; + int x = d; + return x; +} + +int EMSCRIPTEN_KEEPALIVE float_to_uint(float d) { + d += 1.23; + unsigned x = d; + return x; +} + } |