Commit e2343f6d authored by Stefan Behnel's avatar Stefan Behnel

Add constant folding test for large constant * and ** calculations.

parent 4c3229fe
......@@ -109,6 +109,22 @@ def binop_bool():
return plus1, pmix1, minus1, and1, or1, ormix1, xor1, plus3, pmix3, minus3, and3, or3, ormix3, xor3
@cython.test_fail_if_path_exists(
"//MulNode",
"//PowNode",
)
def binop_mul_pow():
"""
>>> binop_mul_pow()
(800, 12193263111263526900, 248832, 12467572902176589255564000298710470656)
"""
mul_int = 20 * 40
mul_large_int = 1234567890 * 9876543210
pow_int = 12 ** 5
pow_large_int = 1234 ** 12
return (mul_int, mul_large_int, pow_int, pow_large_int)
@cython.test_fail_if_path_exists(
"//SliceIndexNode",
)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment