diff options
Diffstat (limited to 'test/ruby/test_complex.rb')
-rw-r--r-- | test/ruby/test_complex.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_complex.rb b/test/ruby/test_complex.rb index 145306ed2a..b797ec10d0 100644 --- a/test/ruby/test_complex.rb +++ b/test/ruby/test_complex.rb @@ -856,6 +856,11 @@ class Complex_Test < Test::Unit::TestCase assert_equal(1, 1.0.magnitude) assert_equal(1, -1.0.magnitude) + assert_equal(4, 2.abs2) + assert_equal(4, -2.abs2) + assert_equal(4.0, 2.0.abs2) + assert_equal(4.0, -2.0.abs2) + assert_equal(0, 1.arg) assert_equal(0, 1.angle) assert_equal(0, 1.phase) |