diff options
author | Sebastian Plamauer <oeplse@gmail.com> | 2015-07-14 14:44:31 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-07-19 21:49:44 +0300 |
commit | 1e8ca3a3cf442733f9210be4d5f6a5b63135a16d (patch) | |
tree | 04897c6ca646c4237af708227fad2616167d89c4 /tests/float/builtin_float_round.py | |
parent | ab14c304931dfed22374a73ed62bd8ba8abb07d2 (diff) | |
download | micropython-1e8ca3a3cf442733f9210be4d5f6a5b63135a16d.tar.gz micropython-1e8ca3a3cf442733f9210be4d5f6a5b63135a16d.zip |
modbuiltins: Implement round() to precision.
Diffstat (limited to 'tests/float/builtin_float_round.py')
-rw-r--r-- | tests/float/builtin_float_round.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/float/builtin_float_round.py b/tests/float/builtin_float_round.py index 6759d0fd5a..4419b744b0 100644 --- a/tests/float/builtin_float_round.py +++ b/tests/float/builtin_float_round.py @@ -2,10 +2,11 @@ # check basic cases tests = [ - 0.0, 1.0, 0.1, -0.1, 123.4, 123.6, -123.4, -123.6 + [0.0], [1.0], [0.1], [-0.1], [123.4], [123.6], [-123.4], [-123.6], + [1.234567, 5], [1.23456, 1], [1.23456, 0], [1234.56, -2] ] for t in tests: - print(round(t)) + print(round(*t)) # check .5 cases for i in range(11): |