mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test: use RbConfig::Limits
* test/lib/envutil.rb: rbconfig/sizeof may not be available when cross-compiling. use RbConfig::Limits instead of calculating limits of Fixnum with hard-coded CHAR_BIT. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6e0967ec6d
commit
033c4a083d
7 changed files with 13 additions and 15 deletions
|
@ -3,8 +3,8 @@ require 'test/unit'
|
|||
require '-test-/integer'
|
||||
|
||||
class TestInteger < Test::Unit::TestCase
|
||||
FIXNUM_MIN = Integer::FIXNUM_MIN
|
||||
FIXNUM_MAX = Integer::FIXNUM_MAX
|
||||
FIXNUM_MIN = RbConfig::Limits['FIXNUM_MIN']
|
||||
FIXNUM_MAX = RbConfig::Limits['FIXNUM_MAX']
|
||||
|
||||
def test_fixnum_range
|
||||
assert_bignum(FIXNUM_MIN-1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue