diff options
author | Andrew Scheller <github@loowis.durge.org> | 2014-05-01 21:21:43 +0100 |
---|---|---|
committer | Andrew Scheller <github@loowis.durge.org> | 2014-05-01 21:21:43 +0100 |
commit | 37067666ee24b018f260a011375f65aa69b49041 (patch) | |
tree | 9b062622de8f0f35a6d4b3c909ad720d2668d847 /tests/float/builtin-float-minmax.py | |
parent | 1f85d6255d6929edbcfc087e4e07c2fde39c3632 (diff) |
Fix the builtin min() and max() functions (and add tests).
Fixes #539
Diffstat (limited to 'tests/float/builtin-float-minmax.py')
-rw-r--r-- | tests/float/builtin-float-minmax.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/float/builtin-float-minmax.py b/tests/float/builtin-float-minmax.py new file mode 100644 index 000000000..ce45a768a --- /dev/null +++ b/tests/float/builtin-float-minmax.py @@ -0,0 +1,26 @@ +# test builtin min and max functions with float args + +print(min(0,1.0)) +print(min(1.0,0)) +print(min(0,-1.0)) +print(min(-1.0,0)) + +print(max(0,1.0)) +print(max(1.0,0)) +print(max(0,-1.0)) +print(max(-1.0,0)) + +print(min(1.5,-1.5)) +print(min(-1.5,1.5)) + +print(max(1.5,-1.5)) +print(max(-1.5,1.5)) + +print(min([1,2.9,4,0,-1,2])) +print(max([1,2.9,4,0,-1,2])) + +print(min([1,2.9,4,6.5,-1,2])) +print(max([1,2.9,4,6.5,-1,2])) +print(min([1,2.9,4,-6.5,-1,2])) +print(max([1,2.9,4,-6.5,-1,2])) + |