diff options
Diffstat (limited to 'tests/run/addop.pyx')
-rw-r--r-- | tests/run/addop.pyx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/run/addop.pyx b/tests/run/addop.pyx index 0e345d0e4..d6c3a3f65 100644 --- a/tests/run/addop.pyx +++ b/tests/run/addop.pyx @@ -166,3 +166,20 @@ def add_large_x(x): ... except TypeError: pass """ return 2**30 + x + + +def add0(x): + """ + >>> add0(0) + (0, 0) + >>> add0(1) + (1, 1) + >>> add0(-1) + (-1, -1) + >>> a, b = add0(2**32) + >>> bigint(a) + 4294967296 + >>> bigint(b) + 4294967296 + """ + return x + 0, 0 + x |