Permalink
Browse files

[t/spec] test for Complex.re and .im

git-svn-id: http://svn.pugscode.org/pugs@25776 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
moritz
moritz committed Mar 9, 2009
1 parent 1d2334c commit 65127307eb2eaeb3b0fb8c67f7c29a94ec909f1e
Showing with 9 additions and 6 deletions.
  1. +9 −6 S32-num/complex.t
View
@@ -2,16 +2,18 @@ use v6;
use Test;
-plan 138;
+plan 140;
-=begin pod
+# Basic tests functions specific to complex numbers.
-Basic tests functions specific to complex numbers.
+# L<S32/Num/=item re>
-L<S29/Num/"=item cis">
-
-=end pod
+{
+ is (1 + 2i).re, 1, 'Complex.re works';
+ is (1 + 2i).im, 2, 'Complex.im works';
+}
+# L<S29/Num/"=item cis">
my $pi = 3.141592653589793238;
{
@@ -84,3 +86,4 @@ my $pi = 3.141592653589793238;
is_approx(4.unpolar(3*$pi/4), -$s + ($s)i,"4.unpolar(pi/4) == -2+2i");
is_approx(4.unpolar($pi), -4, "4.unpolar(pi) == -4");
}
+

0 comments on commit 6512730

Please sign in to comment.