提交 16b4739e 编写于 作者: M Michael Koziarski

Remove special cases for BigDecimal and SQLite, tests pass without them and fail with them.

 


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6437 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 c593721e
......@@ -212,9 +212,7 @@ def test_add_column_not_null_with_default
# functionality. This allows us to more easily catch INSERT being broken,
# but SELECT actually working fine.
def test_native_decimal_insert_manual_vs_automatic
# SQLite3 always uses float in violation of SQL
# 16 decimal places
correct_value = (current_adapter?(:SQLiteAdapter) ? '0.123456789012346E20' : '0012345678901234567890.0123456789').to_d
correct_value = '0012345678901234567890.0123456789'.to_d
Person.delete_all
Person.connection.add_column "people", "wealth", :decimal, :precision => '30', :scale => '10'
......@@ -280,12 +278,8 @@ def test_native_types
# Test for 30 significent digits (beyond the 16 of float), 10 of them
# after the decimal place.
if current_adapter?(:SQLiteAdapter)
# SQLite3 uses float in violation of SQL. Test for 16 decimal places.
assert_equal BigDecimal.new('0.123456789012346E20'), bob.wealth
else
assert_equal BigDecimal.new("0012345678901234567890.0123456789"), bob.wealth
end
assert_equal BigDecimal.new("0012345678901234567890.0123456789"), bob.wealth
assert_equal true, bob.male?
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册