diff options
Diffstat (limited to 'Build/source/utils/asymptote/tests/arith/pair.asy')
-rw-r--r-- | Build/source/utils/asymptote/tests/arith/pair.asy | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Build/source/utils/asymptote/tests/arith/pair.asy b/Build/source/utils/asymptote/tests/arith/pair.asy new file mode 100644 index 00000000000..c815f28b2fa --- /dev/null +++ b/Build/source/utils/asymptote/tests/arith/pair.asy @@ -0,0 +1,20 @@ +import TestLib; + +StartTest("complex addition"); +assert((1,0)+(0,1)==(1,1)); +EndTest(); +StartTest("complex subtraction"); +assert((1,0)-(0,1)==(1,-1)); +EndTest(); +StartTest("complex multiplication"); +assert((1,2)*(2,1)==(0,5)); +EndTest(); +StartTest("complex division"); +assert((0,5)/(2,1)==(1,2)); +EndTest(); +StartTest("length(pair)"); +assert(length((0.0,1.0)) == 1.0); +EndTest(); +StartTest("conj()"); +assert(conj((0.0,1.0))==(0.0, -1.0)); +EndTest(); |