diff options
author | Björn Gustavsson <[email protected]> | 2017-06-14 06:49:44 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2017-06-14 06:49:44 +0200 |
commit | 3a58b85081413df01256841e7e286828cf7e6e35 (patch) | |
tree | 7345c573cd7b47d945a6c622081a234075c17288 /lib/compiler | |
parent | 698068c2322d6032f46487f56802246198e576f2 (diff) | |
parent | 3ea80da9e908e0802b78e19bd29f4ccc2c7be703 (diff) | |
download | otp-3a58b85081413df01256841e7e286828cf7e6e35.tar.gz otp-3a58b85081413df01256841e7e286828cf7e6e35.tar.bz2 otp-3a58b85081413df01256841e7e286828cf7e6e35.zip |
Merge branch 'bjorn/cuddle-with-tests'
* bjorn/cuddle-with-tests:
Eliminate warnings for unused variables
Remove unused functions in test emulator test suites
process_SUITE: Don't leave processes running
trace_port_SUITE: Don't leave processes running
tracer_SUITE: Don't leave processes running
trace_nif_SUITE: Don't leave processes running
trace_bif_SUITE: Don't leave processes running
trace_SUITE: Don't leave processes running
message_queue_data_SUITE: Don't leave processes running
Add informational test case z_SUITE:leaked_processes/1
busy_port_SUITE: Ensure that all created procesesses are killed
busy_port_SUITE: Eliminate warnings for unused variables
busy_port_SUITE: Eliminate 'export_all'
after_SUITE: Don't leave a process running
beam_type_SUITE: Add a test case for an already fixed bug
Diffstat (limited to 'lib/compiler')
-rw-r--r-- | lib/compiler/test/beam_type_SUITE.erl | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/lib/compiler/test/beam_type_SUITE.erl b/lib/compiler/test/beam_type_SUITE.erl index 07dad85c57..86146c614f 100644 --- a/lib/compiler/test/beam_type_SUITE.erl +++ b/lib/compiler/test/beam_type_SUITE.erl @@ -22,7 +22,7 @@ -export([all/0,suite/0,groups/0,init_per_suite/1,end_per_suite/1, init_per_group/2,end_per_group/2, integers/1,coverage/1,booleans/1,setelement/1,cons/1, - tuple/1,record_float/1,binary_float/1]). + tuple/1,record_float/1,binary_float/1,float_compare/1]). suite() -> [{ct_hooks,[ts_install_cth]}]. @@ -39,7 +39,8 @@ groups() -> cons, tuple, record_float, - binary_float + binary_float, + float_compare ]}]. init_per_suite(Config) -> @@ -151,5 +152,25 @@ binary_float(_Config) -> binary_negate_float(<<Float/float>>) -> <<-Float/float>>. +float_compare(_Config) -> + false = do_float_compare(-42.0), + false = do_float_compare(-42), + false = do_float_compare(0), + false = do_float_compare(0.0), + true = do_float_compare(42), + true = do_float_compare(42.0), + ok. + +do_float_compare(X) -> + %% ERL-433: Used to fail before OTP 20. Was accidentally fixed + %% in OTP 20. Add a test case to ensure it stays fixed. + + Y = X + 1.0, + case X > 0 of + T when (T =:= nil) or (T =:= false) -> T; + _T -> Y > 0 + end. + + id(I) -> I. |