Skip to content

Commit

Permalink
Fix Numeric tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony Arcieri committed Jan 8, 2010
1 parent be8ff2f commit b9c940e
Showing 1 changed file with 4 additions and 18 deletions.
22 changes: 4 additions & 18 deletions test/builtins/numeric.re
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ module NumericTest
def run
[
compare_test(),
int_to_list_test(),
float_to_list_test(),
int_to_string_test(),
float_to_string_test(),
str_to_float_test(),
str_to_int_test(),
#str_to_float_test(),
#str_to_int_test(),
pow_test()
]
end
Expand All @@ -25,27 +23,15 @@ module NumericTest
end
end
def int_to_list_test()
TestHelper.expect(Numeric, "converts ints to list") do
(172.to_list(), [49,55,50])
end
end
def float_to_list_test()
TestHelper.expect(Numeric, "converts floats to list") do
(3.1415.to_list(), [51,46,49,52,49,53,48,48])
end
end
def int_to_string_test()
TestHelper.expect(Numeric, "converts ints to string") do
(42.to_string(), "42")
(42.to_s(), "42")
end
end
def float_to_string_test()
TestHelper.expect(Numeric, "converts floats to string") do
(1.2.to_string(), "1.200000")
(1.2.to_s(), "1.200000")
end
end
Expand Down

0 comments on commit b9c940e

Please sign in to comment.