diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_complex.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/ruby/test_complex.rb b/test/ruby/test_complex.rb index 6a5eb0c484..5aa741065a 100644 --- a/test/ruby/test_complex.rb +++ b/test/ruby/test_complex.rb @@ -158,6 +158,9 @@ class Complex_Test < Test::Unit::TestCase c = Complex(0,Complex(1)) assert_equal(Complex.__send__(:new, 0,1), c) + c = Complex(Complex(1,1),Complex(1)) + assert_equal(Complex.__send__(:new, 1,2), c) + c = 5.re assert_equal(Complex.__send__(:new, 5,0), c) @@ -169,7 +172,7 @@ class Complex_Test < Test::Unit::TestCase c = Complex(2,0).im assert_equal(Complex.__send__(:new, 0,2), c) - assert_raise(ArgumentError){Complex(1,2).im} + assert_equal(Complex.__send__(:new, -2,1), Complex(1,2).im) c = Complex::I assert_equal(Complex.__send__(:new, 0,1), c) |