diff options
author | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-09-25 10:41:16 +0000 |
---|---|---|
committer | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-09-25 10:41:16 +0000 |
commit | e87fb88be844f0fae736768846954b6f6f7dc7c3 (patch) | |
tree | cbe2ab069e40b5b7f3217ce95b793426b303a305 /spec/ruby/core/math | |
parent | e59bf54b3a88d0465cca021afae7dc05b6db57a7 (diff) | |
download | ruby-e87fb88be844f0fae736768846954b6f6f7dc7c3.tar.gz |
Update to ruby/spec@241f9e7
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/ruby/core/math')
-rw-r--r-- | spec/ruby/core/math/acos_spec.rb | 14 | ||||
-rw-r--r-- | spec/ruby/core/math/acosh_spec.rb | 10 | ||||
-rw-r--r-- | spec/ruby/core/math/asin_spec.rb | 14 | ||||
-rw-r--r-- | spec/ruby/core/math/log10_spec.rb | 6 | ||||
-rw-r--r-- | spec/ruby/core/math/log_spec.rb | 6 |
5 files changed, 20 insertions, 30 deletions
diff --git a/spec/ruby/core/math/acos_spec.rb b/spec/ruby/core/math/acos_spec.rb index 20af20a000..0f104b8efc 100644 --- a/spec/ruby/core/math/acos_spec.rb +++ b/spec/ruby/core/math/acos_spec.rb @@ -20,14 +20,12 @@ describe "Math.acos" do Math.acos(0.75).should be_close(0.722734247813416, TOLERANCE) end - conflicts_with :Complex do - it "raises an Errno::EDOM if the argument is greater than 1.0" do - lambda { Math.acos(1.0001) }.should raise_error(Errno::EDOM) - end - - it "raises an Errno::EDOM if the argument is less than -1.0" do - lambda { Math.acos(-1.0001) }.should raise_error(Errno::EDOM) - end + it "raises an Math::DomainError if the argument is greater than 1.0" do + lambda { Math.acos(1.0001) }.should raise_error(Math::DomainError) + end + + it "raises an Math::DomainError if the argument is less than -1.0" do + lambda { Math.acos(-1.0001) }.should raise_error(Math::DomainError) end it "raises a TypeError if the string argument cannot be coerced with Float()" do diff --git a/spec/ruby/core/math/acosh_spec.rb b/spec/ruby/core/math/acosh_spec.rb index 6616ea3faa..26c18a530f 100644 --- a/spec/ruby/core/math/acosh_spec.rb +++ b/spec/ruby/core/math/acosh_spec.rb @@ -11,12 +11,10 @@ describe "Math.acosh" do Math.acosh(1.0).should be_close(0.0, TOLERANCE) end - conflicts_with :Complex do - it "raises Errno::EDOM if the passed argument is less than -1.0 or greater than 1.0" do - lambda { Math.acosh(1.0 - TOLERANCE) }.should raise_error(Errno::EDOM) - lambda { Math.acosh(0) }.should raise_error(Errno::EDOM) - lambda { Math.acosh(-1.0) }.should raise_error(Errno::EDOM) - end + it "raises Math::DomainError if the passed argument is less than -1.0 or greater than 1.0" do + lambda { Math.acosh(1.0 - TOLERANCE) }.should raise_error(Math::DomainError) + lambda { Math.acosh(0) }.should raise_error(Math::DomainError) + lambda { Math.acosh(-1.0) }.should raise_error(Math::DomainError) end it "raises a TypeError if the argument cannot be coerced with Float()" do diff --git a/spec/ruby/core/math/asin_spec.rb b/spec/ruby/core/math/asin_spec.rb index e569ce65c4..8591ea80ea 100644 --- a/spec/ruby/core/math/asin_spec.rb +++ b/spec/ruby/core/math/asin_spec.rb @@ -16,14 +16,12 @@ describe "Math.asin" do Math.asin(0.75).should be_close(0.8480620789814816,TOLERANCE) end - conflicts_with :Complex do - it "raises an Errno::EDOM if the argument is greater than 1.0" do - lambda { Math.asin(1.0001) }.should raise_error( Errno::EDOM) - end - - it "raises an Errno::EDOM if the argument is less than -1.0" do - lambda { Math.asin(-1.0001) }.should raise_error( Errno::EDOM) - end + it "raises an Math::DomainError if the argument is greater than 1.0" do + lambda { Math.asin(1.0001) }.should raise_error( Math::DomainError) + end + + it "raises an Math::DomainError if the argument is less than -1.0" do + lambda { Math.asin(-1.0001) }.should raise_error( Math::DomainError) end it "raises a TypeError if the argument cannot be coerced with Float()" do diff --git a/spec/ruby/core/math/log10_spec.rb b/spec/ruby/core/math/log10_spec.rb index 4f2df87760..2c594999b7 100644 --- a/spec/ruby/core/math/log10_spec.rb +++ b/spec/ruby/core/math/log10_spec.rb @@ -15,10 +15,8 @@ describe "Math.log10" do Math.log10(10e15).should be_close(16.0, TOLERANCE) end - conflicts_with :Complex do - it "raises an Errno::EDOM if the argument is less than 0" do - lambda { Math.log10(-1e-15) }.should raise_error( Errno::EDOM) - end + it "raises an Math::DomainError if the argument is less than 0" do + lambda { Math.log10(-1e-15) }.should raise_error(Math::DomainError) end it "raises a TypeError if the argument cannot be coerced with Float()" do diff --git a/spec/ruby/core/math/log_spec.rb b/spec/ruby/core/math/log_spec.rb index 2d9fbeff03..c09e270c06 100644 --- a/spec/ruby/core/math/log_spec.rb +++ b/spec/ruby/core/math/log_spec.rb @@ -15,10 +15,8 @@ describe "Math.log" do Math.log(10e15).should be_close(36.8413614879047, TOLERANCE) end - conflicts_with :Complex do - it "raises an Errno::EDOM if the argument is less than 0" do - lambda { Math.log(-1e-15) }.should raise_error(Errno::EDOM) - end + it "raises an Math::DomainError if the argument is less than 0" do + lambda { Math.log(-1e-15) }.should raise_error(Math::DomainError) end it "raises a TypeError if the argument cannot be coerced with Float()" do |