summaryrefslogtreecommitdiff
path: root/test/visitors/test_to_ruby.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2009-09-30 13:30:41 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2009-09-30 13:30:41 -0700
commit211251bab57a5535e47832b75176096e087c89b0 (patch)
tree870279bc171d0b9a09fca30f4a6d8eff23df6660 /test/visitors/test_to_ruby.rb
parentb4ea13ae1e13e03c4f9293d091d1535e52a6c17e (diff)
downloadpsych-211251bab57a5535e47832b75176096e087c89b0.zip
fixing float edge cases
Diffstat (limited to 'test/visitors/test_to_ruby.rb')
-rw-r--r--test/visitors/test_to_ruby.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/visitors/test_to_ruby.rb b/test/visitors/test_to_ruby.rb
index 65d1297..6facc68 100644
--- a/test/visitors/test_to_ruby.rb
+++ b/test/visitors/test_to_ruby.rb
@@ -29,8 +29,10 @@ module Psych
assert_equal 1.2, i.to_ruby
assert_equal 1, Nodes::Scalar.new('.Inf').to_ruby.infinite?
+ assert_equal 1, Nodes::Scalar.new('.inf').to_ruby.infinite?
assert_equal 1, Nodes::Scalar.new('.Inf', nil, 'tag:yaml.org,2002:float').to_ruby.infinite?
+ assert_equal(-1, Nodes::Scalar.new('-.inf').to_ruby.infinite?)
assert_equal(-1, Nodes::Scalar.new('-.Inf').to_ruby.infinite?)
assert_equal(-1, Nodes::Scalar.new('-.Inf', nil, 'tag:yaml.org,2002:float').to_ruby.infinite?)