mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@902ab83
This commit is contained in:
parent
bb5f710887
commit
e0c5488ff9
56 changed files with 531 additions and 137 deletions
|
|
@ -47,7 +47,7 @@ describe "Integer#/" do
|
|||
end
|
||||
|
||||
it "returns self divided by other" do
|
||||
(@bignum / 4).should == 2305843009213693974
|
||||
(@bignum / 4).should == 4611686018427387926
|
||||
|
||||
(@bignum / bignum_value(2)).should == 1
|
||||
|
||||
|
|
@ -60,15 +60,15 @@ describe "Integer#/" do
|
|||
|
||||
it "returns self divided by Float" do
|
||||
not_supported_on :opal do
|
||||
(bignum_value(88) / 4294967295.0).should be_close(2147483648.5, TOLERANCE)
|
||||
(bignum_value(88) / 4294967295.0).should be_close(4294967297.0, TOLERANCE)
|
||||
end
|
||||
(bignum_value(88) / 4294967295.5).should be_close(2147483648.25, TOLERANCE)
|
||||
(bignum_value(88) / 4294967295.5).should be_close(4294967296.5, TOLERANCE)
|
||||
end
|
||||
|
||||
it "returns result the same class as the argument" do
|
||||
(@bignum / 4).should == 2305843009213693974
|
||||
(@bignum / 4.0).should be_close(2305843009213693974, TOLERANCE)
|
||||
(@bignum / Rational(4, 1)).should == Rational(2305843009213693974, 1)
|
||||
(@bignum / 4).should == 4611686018427387926
|
||||
(@bignum / 4.0).should be_close(4611686018427387926, TOLERANCE)
|
||||
(@bignum / Rational(4, 1)).should == Rational(4611686018427387926, 1)
|
||||
end
|
||||
|
||||
it "does NOT raise ZeroDivisionError if other is zero and is a Float" do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue