summaryrefslogtreecommitdiff
path: root/test/ruby/test_integer.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-01 12:02:36 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-01 12:02:36 +0000
commit2c8e7a50c1db8fea3fb012052828ad1eea51883f (patch)
tree9948c4ef01b8662c9d14a96cc228d7844af68b71 /test/ruby/test_integer.rb
parent0c5e6ab2bb6726b0d70e99db25d5369e196d8ddc (diff)
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@13330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_integer.rb')
-rw-r--r--test/ruby/test_integer.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ruby/test_integer.rb b/test/ruby/test_integer.rb
index e62d503aec..b97ada8fc1 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] }