mirror of
https://github.com/ruby/ruby.git
synced 2025-09-18 18:13:58 +02:00
* complex.c (string_to_c_internal): a refactoring.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
140e1f0b15
commit
6c81a8e44e
3 changed files with 7 additions and 7 deletions
|
@ -704,10 +704,6 @@ class Complex_Test < Test::Unit::TestCase
|
|||
assert_equal(Complex(-0.33), '-0.33'.to_c)
|
||||
assert_equal(Complex(-0.33), '-0.3_3'.to_c)
|
||||
|
||||
assert_equal(Complex(2, 2e4), '2+2e4i'.to_c)
|
||||
assert_equal(Complex(2e3, 2), '2e3+2i'.to_c)
|
||||
assert_equal(Complex(2e3, 2e4), '2e3+2e4i'.to_c)
|
||||
|
||||
assert_equal(Complex.polar(10,10), '10@10'.to_c)
|
||||
assert_equal(Complex.polar(-10,-10), '-10@-10'.to_c)
|
||||
assert_equal(Complex.polar(10.5,10.5), '10.5@10.5'.to_c)
|
||||
|
@ -1104,6 +1100,7 @@ class Complex_Test < Test::Unit::TestCase
|
|||
end
|
||||
assert_equal('-1.0-0.0i', Complex(-1.0, -0.0).to_s)
|
||||
assert_in_delta(Math::PI, Complex(-0.0).arg, 0.001)
|
||||
assert_equal(Complex(2e3, 2e4), '2e3+2e4i'.to_c)
|
||||
end
|
||||
|
||||
def test_known_bug
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue