Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added tests for ()i and \i forms of Complex numbers.

  • Loading branch information...
commit 81b8c360fb527065851f30cc992ca3abfd4ee47f 1 parent 059465d
@lue lue authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 S32-num/complex.t
View
5 S32-num/complex.t
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 477;
+plan 479;
# Basic tests functions specific to complex numbers.
@@ -10,6 +10,9 @@ isa_ok(1 + 2i, Complex, 'postfix:<i> creates a Complex number');
isa_ok(i, Complex, 'i creates a Complex number');
ok i == 1i, 'i == 1i';
+isa_ok((3)i, Complex, '($n)i form creates a Complex number');
+isa_ok(3\i, Complex, '$n\i form creates a Complex number');
+
is_approx((2i)i, -2, 'postfix:<i> works on an imaginary number');
is_approx((2i + 3)i, -2 + 3i, 'postfix:<i> works on a Complex number');
Please sign in to comment.
Something went wrong with that request. Please try again.