diff options
author | kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-03-27 17:13:57 +0000 |
---|---|---|
committer | kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-03-27 17:13:57 +0000 |
commit | 45e866c18adc6612f3866f696b7adfa687afc264 (patch) | |
tree | 36a3849208995ac9e93e2c7a7a64753c8fc03312 /test | |
parent | 83f1be1bc3a627620b6a7e95afef98a2cb1df5d5 (diff) | |
download | ruby-45e866c18adc6612f3866f696b7adfa687afc264.tar.gz |
fix typos
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/-ext-/num2int/test_num2int.rb | 116 |
1 files changed, 58 insertions, 58 deletions
diff --git a/test/-ext-/num2int/test_num2int.rb b/test/-ext-/num2int/test_num2int.rb index 47e57fffc6..dfc334c786 100644 --- a/test/-ext-/num2int/test_num2int.rb +++ b/test/-ext-/num2int/test_num2int.rb @@ -31,7 +31,7 @@ class TestNum2int < Test::Unit::TestCase FIXNUM_MAX = LONG_MAX/2 FIXNUM_MIN = LONG_MIN/2 - def asert_num2i_success(type, num, result=num) + def assert_num2i_success(type, num, result=num) method = "print_num2#{type}" assert_output(result.to_s) do Num2int.send(method, num) @@ -43,7 +43,7 @@ class TestNum2int < Test::Unit::TestCase end end - def asert_num2i_error(type, num) + def assert_num2i_error(type, num) method = "print_num2#{type}" assert_raise(RangeError) do Num2int.send(method, num) @@ -56,86 +56,86 @@ class TestNum2int < Test::Unit::TestCase end def test_num2short - asert_num2i_success(:short, SHRT_MIN) - asert_num2i_success(:short, SHRT_MAX) - asert_num2i_error(:short, SHRT_MIN-1) - asert_num2i_error(:short, SHRT_MAX+1) + assert_num2i_success(:short, SHRT_MIN) + assert_num2i_success(:short, SHRT_MAX) + assert_num2i_error(:short, SHRT_MIN-1) + assert_num2i_error(:short, SHRT_MAX+1) end def test_num2ushort - asert_num2i_success(:ushort, 0) - asert_num2i_success(:ushort, USHRT_MAX) - asert_num2i_success(:ushort, -1, USHRT_MAX) - asert_num2i_success(:ushort, SHRT_MIN, SHRT_MAX+1) - asert_num2i_error(:ushort, SHRT_MIN-1) - asert_num2i_error(:ushort, USHRT_MAX+1) + assert_num2i_success(:ushort, 0) + assert_num2i_success(:ushort, USHRT_MAX) + assert_num2i_success(:ushort, -1, USHRT_MAX) + assert_num2i_success(:ushort, SHRT_MIN, SHRT_MAX+1) + assert_num2i_error(:ushort, SHRT_MIN-1) + assert_num2i_error(:ushort, USHRT_MAX+1) end def test_num2int - asert_num2i_success(:int, INT_MIN) - asert_num2i_success(:int, INT_MAX) - asert_num2i_error(:int, INT_MIN-1) - asert_num2i_error(:int, INT_MAX+1) + assert_num2i_success(:int, INT_MIN) + assert_num2i_success(:int, INT_MAX) + assert_num2i_error(:int, INT_MIN-1) + assert_num2i_error(:int, INT_MAX+1) end def test_num2uint - asert_num2i_success(:uint, 0) - asert_num2i_success(:uint, UINT_MAX) - asert_num2i_success(:uint, -1, UINT_MAX) - asert_num2i_success(:uint, INT_MIN, INT_MAX+1) - asert_num2i_error(:uint, INT_MIN-1) - asert_num2i_error(:uint, UINT_MAX+1) + assert_num2i_success(:uint, 0) + assert_num2i_success(:uint, UINT_MAX) + assert_num2i_success(:uint, -1, UINT_MAX) + assert_num2i_success(:uint, INT_MIN, INT_MAX+1) + assert_num2i_error(:uint, INT_MIN-1) + assert_num2i_error(:uint, UINT_MAX+1) end def test_num2long #assert_output(LONG_MIN.to_s) do # Num2int.print_num2long(LONG_MIN.to_f) #end - asert_num2i_success(:long, LONG_MIN) - asert_num2i_success(:long, LONG_MAX) - asert_num2i_error(:long, LONG_MIN-1) - asert_num2i_error(:long, LONG_MAX+1) - asert_num2i_success(:long, FIXNUM_MIN) - asert_num2i_success(:long, FIXNUM_MIN-1) - asert_num2i_success(:long, FIXNUM_MAX) - asert_num2i_success(:long, FIXNUM_MAX+1) + assert_num2i_success(:long, LONG_MIN) + assert_num2i_success(:long, LONG_MAX) + assert_num2i_error(:long, LONG_MIN-1) + assert_num2i_error(:long, LONG_MAX+1) + assert_num2i_success(:long, FIXNUM_MIN) + assert_num2i_success(:long, FIXNUM_MIN-1) + assert_num2i_success(:long, FIXNUM_MAX) + assert_num2i_success(:long, FIXNUM_MAX+1) end def test_num2ulong - asert_num2i_success(:ulong, 0) - asert_num2i_success(:ulong, ULONG_MAX) - asert_num2i_success(:ulong, -1, ULONG_MAX) - asert_num2i_success(:ulong, LONG_MIN, LONG_MAX+1) - asert_num2i_error(:ulong, LONG_MIN-1) - asert_num2i_error(:ulong, ULONG_MAX+1) - asert_num2i_success(:ulong, FIXNUM_MIN, ULONG_MAX-FIXNUM_MAX) - asert_num2i_success(:ulong, FIXNUM_MIN-1, ULONG_MAX-FIXNUM_MAX-1) - asert_num2i_success(:ulong, FIXNUM_MAX, FIXNUM_MAX) - asert_num2i_success(:ulong, FIXNUM_MAX+1, FIXNUM_MAX+1) + assert_num2i_success(:ulong, 0) + assert_num2i_success(:ulong, ULONG_MAX) + assert_num2i_success(:ulong, -1, ULONG_MAX) + assert_num2i_success(:ulong, LONG_MIN, LONG_MAX+1) + assert_num2i_error(:ulong, LONG_MIN-1) + assert_num2i_error(:ulong, ULONG_MAX+1) + assert_num2i_success(:ulong, FIXNUM_MIN, ULONG_MAX-FIXNUM_MAX) + assert_num2i_success(:ulong, FIXNUM_MIN-1, ULONG_MAX-FIXNUM_MAX-1) + assert_num2i_success(:ulong, FIXNUM_MAX, FIXNUM_MAX) + assert_num2i_success(:ulong, FIXNUM_MAX+1, FIXNUM_MAX+1) end def test_num2ll - asert_num2i_success(:ll, LLONG_MIN) - asert_num2i_success(:ll, LLONG_MAX) - asert_num2i_error(:ll, LLONG_MIN-1) - asert_num2i_error(:ll, LLONG_MAX+1) - asert_num2i_success(:ll, FIXNUM_MIN) - asert_num2i_success(:ll, FIXNUM_MIN-1) - asert_num2i_success(:ll, FIXNUM_MAX) - asert_num2i_success(:ll, FIXNUM_MAX+1) + assert_num2i_success(:ll, LLONG_MIN) + assert_num2i_success(:ll, LLONG_MAX) + assert_num2i_error(:ll, LLONG_MIN-1) + assert_num2i_error(:ll, LLONG_MAX+1) + assert_num2i_success(:ll, FIXNUM_MIN) + assert_num2i_success(:ll, FIXNUM_MIN-1) + assert_num2i_success(:ll, FIXNUM_MAX) + assert_num2i_success(:ll, FIXNUM_MAX+1) end if defined?(Num2int.print_num2ll) def test_num2ull - asert_num2i_success(:ull, 0) - asert_num2i_success(:ull, ULLONG_MAX) - asert_num2i_success(:ull, -1, ULLONG_MAX) - asert_num2i_success(:ull, LLONG_MIN, LLONG_MAX+1) - asert_num2i_error(:ull, LLONG_MIN-1) - asert_num2i_error(:ull, ULLONG_MAX+1) - asert_num2i_success(:ull, FIXNUM_MIN, ULLONG_MAX-FIXNUM_MAX) - asert_num2i_success(:ull, FIXNUM_MIN-1, ULLONG_MAX-FIXNUM_MAX-1) - asert_num2i_success(:ull, FIXNUM_MAX) - asert_num2i_success(:ull, FIXNUM_MAX+1) + assert_num2i_success(:ull, 0) + assert_num2i_success(:ull, ULLONG_MAX) + assert_num2i_success(:ull, -1, ULLONG_MAX) + assert_num2i_success(:ull, LLONG_MIN, LLONG_MAX+1) + assert_num2i_error(:ull, LLONG_MIN-1) + assert_num2i_error(:ull, ULLONG_MAX+1) + assert_num2i_success(:ull, FIXNUM_MIN, ULLONG_MAX-FIXNUM_MAX) + assert_num2i_success(:ull, FIXNUM_MIN-1, ULLONG_MAX-FIXNUM_MAX-1) + assert_num2i_success(:ull, FIXNUM_MAX) + assert_num2i_success(:ull, FIXNUM_MAX+1) end if defined?(Num2int.print_num2ull) end |