From 638a7a9c546f867882ee3d19af458bb25f62fb01 Mon Sep 17 00:00:00 2001 From: akr Date: Sat, 1 Sep 2007 12:02:36 +0000 Subject: * include/ruby/ruby.h (struct RBignum): embed digits in RBignum for small bignums. * bignum.c: RBignum embeded digits implemented. * include/ruby/intern.h: declare rb_big_resize. * gc.c: don't free embedded digits. * numeric.c: replace direct bignum field accessor by abstract field accessor such as RBIGNUM(val)->sign to RBIGNUM_SIGN(val). * sprintf.c: ditto. * compar.c: ditto. * marshal.c: ditto. * random.c: ditto. * .gdbinit: support embedded small bignums. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_integer.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_integer.rb b/test/ruby/test_integer.rb index e62d503ae..b97ada8fc 100644 --- a/test/ruby/test_integer.rb +++ b/test/ruby/test_integer.rb @@ -2,6 +2,12 @@ require 'test/unit' class TestInteger < Test::Unit::TestCase VS = [ + -0x1000000000000000000000000000000000000000000000002, + -0x1000000000000000000000000000000000000000000000001, + -0x1000000000000000000000000000000000000000000000000, + -0x1000000000000000000000002, + -0x1000000000000000000000001, + -0x1000000000000000000000000, -0x10000000000000002, -0x10000000000000001, -0x10000000000000000, @@ -89,6 +95,12 @@ class TestInteger < Test::Unit::TestCase 0xffffffffffffffff, 0x10000000000000000, 0x10000000000000001, + 0xffffffffffffffffffffffff, + 0x1000000000000000000000000, + 0x1000000000000000000000001, + 0xffffffffffffffffffffffffffffffffffffffffffffffff, + 0x1000000000000000000000000000000000000000000000000, + 0x1000000000000000000000000000000000000000000000001 ] #VS.map! {|v| 0x4000000000000000.coerce(v)[0] } -- cgit