diff options
Diffstat (limited to 'test/ruby/test_fixnum.rb')
-rw-r--r-- | test/ruby/test_fixnum.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/ruby/test_fixnum.rb b/test/ruby/test_fixnum.rb index e55e324bd1..2aee65c211 100644 --- a/test/ruby/test_fixnum.rb +++ b/test/ruby/test_fixnum.rb @@ -103,15 +103,15 @@ class TestFixnum < Test::Unit::TestCase end def test_lshift - assert_equal(0x40000000, 0x20000000<<1) - assert_equal(-0x40000000, (-0x20000000)<<1) - assert_equal(-0x80000000, (-0x40000000)<<1) + assert_equal(0x40000000, 0x20000000 << 1) + assert_equal(-0x40000000, (-0x20000000) << 1) + assert_equal(-0x80000000, (-0x40000000) << 1) end def test_rshift - assert_equal(0x20000000, 0x40000000>>1) - assert_equal(-0x20000000, (-0x40000000)>>1) - assert_equal(-0x40000000, (-0x80000000)>>1) + assert_equal(0x20000000, 0x40000000 >> 1) + assert_equal(-0x20000000, (-0x40000000) >> 1) + assert_equal(-0x40000000, (-0x80000000) >> 1) end def test_abs @@ -187,7 +187,7 @@ class TestFixnum < Test::Unit::TestCase assert_equal(4, 2**((2**32).coerce(2).first)) assert_equal(2, 4**0.5) assert_equal(0, 0**0.5) - assert((0**-1.0).infinite?) + assert_equal(1, (0**-1.0).infinite?) ### rational changes the behavior of Fixnum#** #assert_raise(TypeError) { 1 ** nil } assert_raise(TypeError, NoMethodError) { 1 ** nil } |