summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKenta Murata <mrkn@users.noreply.github.com>2020-09-16 19:27:16 +0900
committerGitHub <noreply@github.com>2020-09-16 19:27:16 +0900
commit68b5f14d536c1a81c63412a9f3701380c9bc116c (patch)
treecbd284825188b61e827fa070afa8384c0659dcb3 /test
parent10290da54d04345587f63cb96ad833043e7f7f1c (diff)
Fix assertion failed in Complex.polar without NDEBUG (#3551)
Fixes [Bug #17172].
Notes
Notes: Merged-By: mrkn <mrkn@ruby-lang.org>
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_complex.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_complex.rb b/test/ruby/test_complex.rb
index a4fe9d4232..a3a7546575 100644
--- a/test/ruby/test_complex.rb
+++ b/test/ruby/test_complex.rb
@@ -220,6 +220,11 @@ class Complex_Test < Test::Unit::TestCase
def test_polar
assert_equal([1,2], Complex.polar(1,2).polar)
assert_equal(Complex.polar(1.0, Math::PI * 2 / 3), Complex.polar(1, Math::PI * 2 / 3))
+
+ assert_in_out_err([], <<-'end;', ['OK'], [])
+ Complex.polar(1, Complex(1, 0))
+ puts :OK
+ end;
end
def test_uplus