diff options
author | Björn Gustavsson <[email protected]> | 2016-09-05 11:50:33 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2016-09-05 11:50:33 +0200 |
commit | 6150c222ec25cc4e8aba80985017c5b7120bc454 (patch) | |
tree | 9c149f8d7b3d6c8135fcfe0b73b3dae8d88800d7 /lib/compiler/test | |
parent | b501396623e80a798fba94a428646461aabe6796 (diff) | |
parent | 6d40cfd77f1d2f1e1403e4b41c0b53ae6499ea11 (diff) | |
download | otp-6150c222ec25cc4e8aba80985017c5b7120bc454.tar.gz otp-6150c222ec25cc4e8aba80985017c5b7120bc454.tar.bz2 otp-6150c222ec25cc4e8aba80985017c5b7120bc454.zip |
Merge branch 'bjorn/floor-ceiling/OTP-13692'
* bjorn/floor-ceiling/OTP-13692:
Add math:floor/1 and math:ceil/1
Implement the new ceil/1 and floor/1 guard BIFs
Diffstat (limited to 'lib/compiler/test')
-rw-r--r-- | lib/compiler/test/bif_SUITE.erl | 4 | ||||
-rw-r--r-- | lib/compiler/test/float_SUITE.erl | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/lib/compiler/test/bif_SUITE.erl b/lib/compiler/test/bif_SUITE.erl index 6d7231b426..6bde2f1da9 100644 --- a/lib/compiler/test/bif_SUITE.erl +++ b/lib/compiler/test/bif_SUITE.erl @@ -67,9 +67,9 @@ food(Curriculum) -> 0 end, Curriculum]. -%% Test trunc/1, round/1. +%% Test trunc/1, round/1, floor/1, ceil/1. trunc_and_friends(_Config) -> - Bifs = [trunc,round], + Bifs = [trunc,round,floor,ceil], Fs = trunc_and_friends_1(Bifs), Mod = ?FUNCTION_NAME, Calls = [begin diff --git a/lib/compiler/test/float_SUITE.erl b/lib/compiler/test/float_SUITE.erl index f6095947ca..0ebc71eb9b 100644 --- a/lib/compiler/test/float_SUITE.erl +++ b/lib/compiler/test/float_SUITE.erl @@ -150,6 +150,11 @@ math_functions(Config) when is_list(Config) -> ?OPTIONAL(0.0, math:erf(id(0))), ?OPTIONAL(1.0, math:erfc(id(0))), + 5.0 = math:floor(5.6), + 6.0 = math:ceil(5.6), + 5.0 = math:floor(id(5.4)), + 6.0 = math:ceil(id(5.4)), + %% Only for coverage (of beam_type.erl). {'EXIT',{undef,_}} = (catch math:fnurfla(0)), {'EXIT',{undef,_}} = (catch math:fnurfla(0, 0)), |