mirror of
https://github.com/ruby/ruby.git
synced 2025-08-24 05:25:34 +02:00
* test/rexml/test_contrib.rb: Indent.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
313fa18033
commit
ba3d2f4ac2
36 changed files with 5153 additions and 5149 deletions
|
@ -3,32 +3,32 @@ require 'test/unit'
|
|||
require 'rexml/functions'
|
||||
|
||||
module REXMLTests
|
||||
class TC_Rexml_Functions_Number < Test::Unit::TestCase
|
||||
class TC_Rexml_Functions_Number < Test::Unit::TestCase
|
||||
|
||||
def test_functions_number_int
|
||||
telem = REXML::Element.new("elem")
|
||||
telem.text="9"
|
||||
assert_equal(9, REXML::Functions::number(telem))
|
||||
def test_functions_number_int
|
||||
telem = REXML::Element.new("elem")
|
||||
telem.text="9"
|
||||
assert_equal(9, REXML::Functions::number(telem))
|
||||
end
|
||||
def test_functions_number_float
|
||||
telem = REXML::Element.new("elem")
|
||||
telem.text="10.4"
|
||||
assert_equal(10.4, REXML::Functions::number(telem))
|
||||
end
|
||||
def test_functions_number_negative_int
|
||||
telem = REXML::Element.new("elem")
|
||||
telem.text="-9"
|
||||
assert_equal(-9, REXML::Functions::number(telem))
|
||||
end
|
||||
def test_functions_number_negative_float
|
||||
telem = REXML::Element.new("elem")
|
||||
telem.text="-9.13"
|
||||
assert_equal(-9.13, REXML::Functions::number(telem))
|
||||
end
|
||||
#def test_functions_number_scientific_notation
|
||||
# telem = REXML::Element.new("elem")
|
||||
# telem.text="9.13E12"
|
||||
# assert_equal(9.13E12, REXML::Functions::number(telem))
|
||||
#end
|
||||
end
|
||||
def test_functions_number_float
|
||||
telem = REXML::Element.new("elem")
|
||||
telem.text="10.4"
|
||||
assert_equal(10.4, REXML::Functions::number(telem))
|
||||
end
|
||||
def test_functions_number_negative_int
|
||||
telem = REXML::Element.new("elem")
|
||||
telem.text="-9"
|
||||
assert_equal(-9, REXML::Functions::number(telem))
|
||||
end
|
||||
def test_functions_number_negative_float
|
||||
telem = REXML::Element.new("elem")
|
||||
telem.text="-9.13"
|
||||
assert_equal(-9.13, REXML::Functions::number(telem))
|
||||
end
|
||||
#def test_functions_number_scientific_notation
|
||||
# telem = REXML::Element.new("elem")
|
||||
# telem.text="9.13E12"
|
||||
# assert_equal(9.13E12, REXML::Functions::number(telem))
|
||||
#end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue