[pypy-svn] r43639 - pypy/dist/pypy/lang/prolog/interpreter/test
cfbolz at codespeak.net
cfbolz at codespeak.net
Fri May 25 18:08:01 CEST 2007
Author: cfbolz
Date: Fri May 25 18:08:00 2007
New Revision: 43639
Modified:
pypy/dist/pypy/lang/prolog/interpreter/test/test_arithmetic.py
Log:
more tests
Modified: pypy/dist/pypy/lang/prolog/interpreter/test/test_arithmetic.py
==============================================================================
--- pypy/dist/pypy/lang/prolog/interpreter/test/test_arithmetic.py (original)
+++ pypy/dist/pypy/lang/prolog/interpreter/test/test_arithmetic.py Fri May 25 18:08:00 2007
@@ -81,6 +81,17 @@
assert_true("X is float_integer_part(-0.6), X = 0.")
assert_true("X is float_integer_part(-1), X = -1.")
+ assert_true("X is float_fractional_part(1), X = 0.")
+ assert_true("X is float_fractional_part(2), X = 0.")
+ assert_true("X is float_fractional_part(-1), X = 0.")
+ assert_true("X is float_fractional_part(1.2), Y is 1.2 - 1, X = Y.")
+ assert_true("X is float_fractional_part(1.4), Y is 1.4 - 1, X = Y.")
+ assert_true("X is float_fractional_part(1.6), Y is 1.6 - 1, X = Y.")
+ assert_true("X is float_fractional_part(-1.2), X is -1.2 + 1, X = Y.")
+ assert_true("X is float_fractional_part(-1.4), X is -1.4 + 1, X = Y.")
+ assert_true("X is float_fractional_part(-1.6), X is -1.6 + 1, X = Y.")
+
+ assert_true("X is 2 ** 4, X = 16.")
def test_comparison():
assert_true("1 =:= 1.0.")
More information about the Pypy-commit
mailing list