Sha256: c303dc419cf7c6c4215ff5a0cb6390e3dc532c0a1f3598cf66c0444f444d87df

Contents?: true

Size: 716 Bytes

Versions: 83

Compression:

Stored size: 716 Bytes

Contents

describe :float_modulo, :shared => true do
  it "returns self modulo other" do
    6543.21.send(@method, 137).should be_close(104.21, TOLERANCE)
    5667.19.send(@method, bignum_value).should be_close(5667.19, TOLERANCE)
    6543.21.send(@method, 137.24).should be_close(92.9299999999996, TOLERANCE)

    6543.21.send(@method, 137).should be_close(6543.21.%(137), TOLERANCE)
    5667.19.send(@method, bignum_value).should be_close(5667.19.%(0xffffffff), TOLERANCE)
    6543.21.send(@method, 137.24).should be_close(6543.21.%(137.24), TOLERANCE)
  end

  it "does NOT raise ZeroDivisionError if other is zero" do
    1.0.send(@method, 0).to_s.should == 'NaN'
    1.0.send(@method, 0.0).to_s.should == 'NaN'
  end
end

Version data entries

83 entries across 83 versions & 1 rubygems

Version Path
rhodes-2.0.2 spec/framework_spec/app/spec/core/float/shared/modulo.rb
rhodes-2.0.0 spec/framework_spec/app/spec/core/float/shared/modulo.rb
rhodes-2.0.0.rc2 spec/framework_spec/app/spec/core/float/shared/modulo.rb
rhodes-2.0.0.rc1 spec/framework_spec/app/spec/core/float/shared/modulo.rb
rhodes-2.0.0.beta11 spec/framework_spec/app/spec/core/float/shared/modulo.rb
rhodes-2.0.0.beta10 spec/framework_spec/app/spec/core/float/shared/modulo.rb
rhodes-2.0.0.beta9 spec/framework_spec/app/spec/core/float/shared/modulo.rb
rhodes-2.0.0.beta8 spec/framework_spec/app/spec/core/float/shared/modulo.rb
rhodes-2.0.0.beta7 spec/framework_spec/app/spec/core/float/shared/modulo.rb
rhodes-2.0.0.beta6 spec/framework_spec/app/spec/core/float/shared/modulo.rb
rhodes-2.0.0.beta4 spec/framework_spec/app/spec/core/float/shared/modulo.rb
rhodes-2.0.0.beta3 spec/framework_spec/app/spec/core/float/shared/modulo.rb
rhodes-1.5.5 spec/framework_spec/app/spec/core/float/shared/modulo.rb
rhodes-2.0.0.beta2 spec/framework_spec/app/spec/core/float/shared/modulo.rb
rhodes-2.0.0.beta1 spec/framework_spec/app/spec/core/float/shared/modulo.rb
rhodes-1.5.4 spec/framework_spec/app/spec/core/float/shared/modulo.rb
rhodes-1.5.3 spec/framework_spec/app/spec/core/float/shared/modulo.rb
rhodes-1.5.2 spec/framework_spec/app/spec/core/float/shared/modulo.rb
rhodes-1.5.1 spec/framework_spec/app/spec/core/float/shared/modulo.rb
rhodes-1.5.0 spec/framework_spec/app/spec/core/float/shared/modulo.rb