aboutsummaryrefslogtreecommitdiff
path: root/tests/misc
diff options
context:
space:
mode:
authorDoug Currie2016-01-30 22:35:58 -0500
committerDamien George2016-02-03 22:13:39 +0000
commit2e2e15cec2f85ece763f3f80152d759aecfad47c (patch)
treefc70fb1001ea72640bdb5f5b49c6951a65410817 /tests/misc
parent5f3e005b6791634b104fa6385c8a9bf5ed1af164 (diff)
py/mpz: Complete implementation of mpz_{and,or,xor} for negative args.
For these 3 bitwise operations there are now fast functions for positive-only arguments, and general functions for arbitrary sign arguments (the fast functions are the existing implementation). By default the fast functions are not used (to save space) and instead the general functions are used for all operations. Enable MICROPY_OPT_MPZ_BITWISE to use the fast functions for positive arguments.
Diffstat (limited to 'tests/misc')
-rw-r--r--tests/misc/non_compliant.py19
-rw-r--r--tests/misc/non_compliant.py.exp3
2 files changed, 0 insertions, 22 deletions
diff --git a/tests/misc/non_compliant.py b/tests/misc/non_compliant.py
index 9c55ac2c3..c760c2acc 100644
--- a/tests/misc/non_compliant.py
+++ b/tests/misc/non_compliant.py
@@ -70,22 +70,3 @@ try:
except NotImplementedError:
print('NotImplementedError')
-mpz = 1 << 70
-
-# mpz and with both args negative
-try:
- -mpz & -2
-except NotImplementedError:
- print('NotImplementedError')
-
-# mpz or with args opposite sign
-try:
- -mpz | 2
-except NotImplementedError:
- print('NotImplementedError')
-
-# mpz xor with args opposite sign
-try:
- -mpz ^ 2
-except NotImplementedError:
- print('NotImplementedError')
diff --git a/tests/misc/non_compliant.py.exp b/tests/misc/non_compliant.py.exp
index 5937ccb2f..28b1470d7 100644
--- a/tests/misc/non_compliant.py.exp
+++ b/tests/misc/non_compliant.py.exp
@@ -9,6 +9,3 @@ NotImplementedError
NotImplementedError
NotImplementedError
NotImplementedError
-NotImplementedError
-NotImplementedError
-NotImplementedError