Browse files

[t/spec] Add tests for i as 1i.

git-svn-id: http://svn.pugscode.org/pugs@28891 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent 50bfd05 commit 3c114793be9cc855859794a2955c44c5f76c4f96 colomon committed Oct 24, 2009
Showing with 5 additions and 0 deletions.
  1. +5 −0 S32-num/complex.t
View
5 S32-num/complex.t
@@ -11,6 +11,11 @@ isa_ok(1 + 2i, Complex, 'postfix:<i> 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');
+#?rakudo 3 skip 'standalone i NYI'
+is_approx(i, 1i, 'standalone i works to generate a Complex number');
+is_approx(1 - i, 1 - 1i, 'standalone i works to generate a Complex number');
+is_approx(2i * i, -2, 'standalone i works times a Complex number');
+
# checked with the open CAS system "yacas":
# In> (3+4*I) / (2-I)
# Out> Complex(2/5,11/5)

0 comments on commit 3c11479

Please sign in to comment.