Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[t/spec] Add tests for Complex.perl.

git-svn-id: http://svn.pugscode.org/pugs@28816 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
commit b2275f5ee49a82291f8ed24584b8c67e686f337d 1 parent 0597882
authored October 18, 2009

Showing 1 changed file with 8 additions and 1 deletion. Show diff stats Hide diff stats

  1. 9  S32-num/complex.t
9  S32-num/complex.t
@@ -24,7 +24,14 @@ is_approx 2/(3+1i),      3/5 -(1/5)i,   'dividing a Real by a Complex';
24 24
 is_approx 2 * (3+7i),    6+14i,         'Real * Complex';
25 25
 is_approx (3+7i) * 2,    6+14i,         'Complex * Real';
26 26
 
27  
-# MUST: test .perl, .Str
  27
+isa_ok( eval((1+3i).perl), Complex, 'eval (1+3i).perl is Complex' );
  28
+is_approx( (eval (1+3i).perl), 1+3i, 'eval (1+3i).perl is 1+3i' );
  29
+isa_ok( eval((1+0i).perl), Complex, 'eval (1+0i).perl is Complex' );
  30
+is_approx( (eval (1+0i).perl), 1, 'eval (1+0i).perl is 1' );
  31
+isa_ok( eval((3i).perl), Complex, 'eval (3i).perl is Complex' );
  32
+is_approx( (eval (3i).perl), 3i, 'eval (3i).perl is 3i' );
  33
+
  34
+# MUST: test .Str
28 35
 
29 36
 my @examples = (0i, 1 + 0i, -1 + 0i, 1i, -1i, 2 + 0i, -2 + 0i, 2i, -2i,
30 37
                 2 + 3i, 2 - 3i, -2 + 3i, -2 - 3i,

0 notes on commit b2275f5

Please sign in to comment.
Something went wrong with that request. Please try again.