summaryrefslogtreecommitdiff
path: root/Examples/test-suite/python/complextest_runme.py
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2020-10-10 09:11:43 +0100
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2020-10-10 15:01:29 +0100
commitfd592fdc3b01791eba19ed8eace26b7196d567c8 (patch)
treed3eac95319f839559d4871ff8f9731307d7ff0c3 /Examples/test-suite/python/complextest_runme.py
parent9a2513bf8532e7375ecb1c2dc2949dddb22063d1 (diff)
downloadswig-fd592fdc3b01791eba19ed8eace26b7196d567c8.tar.gz
Split C complex.h from C++ complex testing
Diffstat (limited to 'Examples/test-suite/python/complextest_runme.py')
-rw-r--r--Examples/test-suite/python/complextest_runme.py30
1 files changed, 10 insertions, 20 deletions
diff --git a/Examples/test-suite/python/complextest_runme.py b/Examples/test-suite/python/complextest_runme.py
index 3eef2b2bc..1b9ad6629 100644
--- a/Examples/test-suite/python/complextest_runme.py
+++ b/Examples/test-suite/python/complextest_runme.py
@@ -14,26 +14,16 @@ if complextest.Conj2(a) != a.conjugate():
if complextest.Conjf2(a) != a.conjugate():
raise RuntimeError("bad complex mapping")
-if 'Conj3' in dir(complextest):
- if complextest.Conj3(a) != a.conjugate():
- raise RuntimeError("bad complex mapping")
+v = (complex(1, 2), complex(2, 3), complex(4, 3), 1)
-if 'Conjf3' in dir(complextest):
- if complextest.Conjf3(a) != a.conjugate():
- raise RuntimeError("bad complex mapping")
+if len(complextest.CopyHalf(v)) != 2:
+ raise RuntimeError("CopyHalf failed")
-if 'CopyHalf' in dir(complextest):
+if len(complextest.CopyHalfRef(v)) != 2:
+ raise RuntimeError("CopyHalfRef failed")
- v = (complex(1, 2), complex(2, 3), complex(4, 3), 1)
-
- if len(complextest.CopyHalf(v)) != 2:
- raise RuntimeError("CopyHalf failed")
-
- if len(complextest.CopyHalfRef(v)) != 2:
- raise RuntimeError("CopyHalfRef failed")
-
- p = complextest.ComplexPair()
- p.z1 = complex(0, 1)
- p.z2 = complex(0, -1)
- if complextest.Conj(p.z2) != p.z1:
- raise RuntimeError("bad complex mapping")
+p = complextest.ComplexPair()
+p.z1 = complex(0, 1)
+p.z2 = complex(0, -1)
+if complextest.Conj(p.z2) != p.z1:
+ raise RuntimeError("bad complex mapping")