diff options
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/test_json_addition.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_json_addition.rb b/tests/test_json_addition.rb index a8181e8..f28f228 100755 --- a/tests/test_json_addition.rb +++ b/tests/test_json_addition.rb @@ -164,4 +164,9 @@ class TC_JSONAddition < Test::Unit::TestCase d = DateTime.civil(2008, 6, 17, 11, 48, 32, Rational(12,24)) assert_equal d, JSON.parse(d.to_json) end + + def test_rational_complex + assert_equal Rational(2, 9), JSON(JSON(Rational(2, 9))) + assert_equal Complex(2, 9), JSON(JSON(Complex(2, 9))) + end end |