diff options
author | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-09-20 20:18:52 +0000 |
---|---|---|
committer | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-09-20 20:18:52 +0000 |
commit | 1d15d5f08032acf1b7bceacbb450d617ff6e0931 (patch) | |
tree | a3785a79899302bc149e4a6e72f624ac27dc1f10 /spec/rubyspec/library/complex/math/shared/acos.rb | |
parent | 75bfc6440d595bf339007f4fb280fd4d743e89c1 (diff) |
Move spec/rubyspec to spec/ruby for consistency
* Other ruby implementations use the spec/ruby directory.
[Misc #13792] [ruby-core:82287]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/rubyspec/library/complex/math/shared/acos.rb')
-rw-r--r-- | spec/rubyspec/library/complex/math/shared/acos.rb | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/spec/rubyspec/library/complex/math/shared/acos.rb b/spec/rubyspec/library/complex/math/shared/acos.rb deleted file mode 100644 index 7a9e0fe1b2..0000000000 --- a/spec/rubyspec/library/complex/math/shared/acos.rb +++ /dev/null @@ -1,41 +0,0 @@ -require File.expand_path('../../fixtures/classes', __FILE__) - -describe :complex_math_acos, shared: true do - it "returns the arccosine of the passed argument" do - @object.send(:acos, 1).should be_close(0.0, TOLERANCE) - @object.send(:acos, 0).should be_close(1.5707963267949, TOLERANCE) - @object.send(:acos, -1).should be_close(Math::PI,TOLERANCE) - end - - it "returns the arccosine for Complex numbers" do - @object.send(:acos, Complex(3, 4)).should be_close(Complex(0.93681246115572, -2.30550903124348), TOLERANCE) - end - - it "returns the arccosine for numbers greater than 1.0 as a Complex number" do - @object.send(:acos, 1.0001).should be_close(Complex(0.0, 0.0141420177752494), TOLERANCE) - end - - it "returns the arccosine for numbers less than -1.0 as a Complex number" do - @object.send(:acos, -1.0001).should be_close(Complex(3.14159265358979, -0.0141420177752495), TOLERANCE) - end -end - -describe :complex_math_acos_bang, shared: true do - it "returns the arccosine of the argument" do - @object.send(:acos!, 1).should be_close(0.0, TOLERANCE) - @object.send(:acos!, 0).should be_close(1.5707963267949, TOLERANCE) - @object.send(:acos!, -1).should be_close(Math::PI,TOLERANCE) - end - - it "raises a TypeError when passed a Complex number" do - lambda { @object.send(:acos!, Complex(4, 5)) }.should raise_error(TypeError) - end - - it "raises an Errno::EDOM for numbers greater than 1.0" do - lambda { @object.send(:acos!, 1.0001) }.should raise_error(Errno::EDOM) - end - - it "raises an Errno::EDOM for numbers less than -1.0" do - lambda { @object.send(:acos!, -1.0001) }.should raise_error(Errno::EDOM) - end -end |