diff options
author | Florian Frank <flori@ping.de> | 2011-08-25 08:52:47 +0200 |
---|---|---|
committer | Florian Frank <flori@ping.de> | 2011-08-25 08:52:47 +0200 |
commit | d98acaecd9391e21e2fe1a0771ab8b93b3b4bdf1 (patch) | |
tree | 17efd9856023fc39e2ddeb31500be797886cfccb /tests | |
parent | 9320a2a18a4d09f8e8a83129db793057968928b1 (diff) | |
download | json-d98acaecd9391e21e2fe1a0771ab8b93b3b4bdf1.tar.gz |
Add (de-)serialisation methods f. Complex/Rational
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 |