mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@c1b568b
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8a15857a7f
commit
401b64c4e8
3689 changed files with 6095 additions and 6096 deletions
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../shared/abs', __FILE__)
|
||||
require_relative 'shared/abs'
|
||||
|
||||
describe "Float#abs" do
|
||||
it_behaves_like :float_abs, :abs
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../shared/complex/float/arg', __FILE__)
|
||||
require_relative '../../shared/complex/float/arg'
|
||||
|
||||
describe "Float#angle" do
|
||||
it_behaves_like :float_arg, :angle
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../shared/complex/float/arg', __FILE__)
|
||||
require_relative '../../shared/complex/float/arg'
|
||||
|
||||
describe "Float#arg" do
|
||||
it_behaves_like :float_arg, :arg
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/equal', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/equal'
|
||||
|
||||
describe "Float#===" do
|
||||
it_behaves_like :float_equal, :===
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "Float#ceil" do
|
||||
it "returns the smallest Integer greater than or equal to self" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "Float#coerce" do
|
||||
it "returns [other, self] both as Floats" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "Float#<=>" do
|
||||
it "returns -1, 0, 1 when self is less than, equal, or greater than other" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "Float constant" do
|
||||
it "DIG is 15" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "Float#denominator" do
|
||||
before :each do
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../fixtures/coerce.rb', __FILE__)
|
||||
require File.expand_path('../shared/arithmetic_exception_in_coerce', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'fixtures/coerce'
|
||||
require_relative 'shared/arithmetic_exception_in_coerce'
|
||||
|
||||
describe "Float#/" do
|
||||
it_behaves_like :float_arithmetic_exception_in_coerce, :/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "Float#divmod" do
|
||||
it "returns an [quotient, modulus] from dividing self by other" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
ruby_version_is '2.4' do
|
||||
describe "Float#dup" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "Float#eql?" do
|
||||
it "returns true if other is a Float equal to self" do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/equal', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/equal'
|
||||
|
||||
describe "Float#==" do
|
||||
it_behaves_like :float_equal, :==
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "Float#**" do
|
||||
it "returns self raise to the other power" do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/quo', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/quo'
|
||||
|
||||
describe "Float#fdiv" do
|
||||
it_behaves_like :float_quo, :fdiv
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "Float#finite?" do
|
||||
it "returns true for finite values" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "Float" do
|
||||
it "includes Comparable" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "Float#floor" do
|
||||
it "returns the largest Integer less than or equal to self" do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/comparison_exception_in_coerce', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/comparison_exception_in_coerce'
|
||||
|
||||
describe "Float#>" do
|
||||
it_behaves_like :float_comparison_exception_in_coerce, :>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/comparison_exception_in_coerce', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/comparison_exception_in_coerce'
|
||||
|
||||
describe "Float#>=" do
|
||||
it_behaves_like :float_comparison_exception_in_coerce, :>=
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "Float#hash" do
|
||||
it "is provided" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "Float#infinite?" do
|
||||
it "returns nil for finite values" do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/comparison_exception_in_coerce', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/comparison_exception_in_coerce'
|
||||
|
||||
describe "Float#<" do
|
||||
it_behaves_like :float_comparison_exception_in_coerce, :<
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/comparison_exception_in_coerce', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/comparison_exception_in_coerce'
|
||||
|
||||
describe "Float#<=" do
|
||||
it_behaves_like :float_comparison_exception_in_coerce, :>=
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../shared/abs', __FILE__)
|
||||
require_relative 'shared/abs'
|
||||
|
||||
describe "Float#magnitude" do
|
||||
it_behaves_like :float_abs, :magnitude
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/arithmetic_exception_in_coerce', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/arithmetic_exception_in_coerce'
|
||||
|
||||
describe "Float#-" do
|
||||
it_behaves_like :float_arithmetic_exception_in_coerce, :-
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/modulo', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/modulo'
|
||||
|
||||
describe "Float#%" do
|
||||
it_behaves_like :float_modulo, :%
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/arithmetic_exception_in_coerce', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/arithmetic_exception_in_coerce'
|
||||
|
||||
describe "Float#*" do
|
||||
it_behaves_like :float_arithmetic_exception_in_coerce, :*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "Float#nan?" do
|
||||
it "returns true if self is not a valid IEEE floating-point number" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "Float#next_float" do
|
||||
it "returns a float the smallest possible step greater than the receiver" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "Float#numerator" do
|
||||
before :all do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../shared/complex/float/arg', __FILE__)
|
||||
require_relative '../../shared/complex/float/arg'
|
||||
|
||||
describe "Float#phase" do
|
||||
it_behaves_like :float_arg, :phase
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/arithmetic_exception_in_coerce', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/arithmetic_exception_in_coerce'
|
||||
|
||||
describe "Float#+" do
|
||||
it_behaves_like :float_arithmetic_exception_in_coerce, :+
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "Float#prev_float" do
|
||||
it "returns a float the smallest possible step smaller than the receiver" do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/quo', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/quo'
|
||||
|
||||
describe "Float#quo" do
|
||||
it_behaves_like :float_quo, :quo
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "Float#rationalize" do
|
||||
it "returns self as a simplified Rational with no argument" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "Float#round" do
|
||||
it "returns the nearest Integer" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../../spec_helper', __FILE__)
|
||||
require_relative '../../../spec_helper'
|
||||
|
||||
describe :float_abs, shared: true do
|
||||
it "returns the absolute value" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../fixtures/classes', __FILE__)
|
||||
require_relative '../fixtures/classes'
|
||||
|
||||
describe :float_arithmetic_exception_in_coerce, shared: true do
|
||||
ruby_version_is ""..."2.5" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../fixtures/classes', __FILE__)
|
||||
require_relative '../fixtures/classes'
|
||||
|
||||
describe :float_comparison_exception_in_coerce, shared: true do
|
||||
ruby_version_is ""..."2.5" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "Float#to_f" do
|
||||
it "returns self" do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/to_i', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/to_i'
|
||||
|
||||
describe "Float#to_i" do
|
||||
it_behaves_like :float_to_i, :to_i
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/to_i', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/to_i'
|
||||
|
||||
describe "Float#to_int" do
|
||||
it_behaves_like :float_to_i, :to_int
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "Float#to_r" do
|
||||
it "needs to be reviewed for spec completeness"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "Float#to_s" do
|
||||
it "returns 'NaN' for NaN" do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require File.expand_path('../shared/to_i', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
require_relative 'shared/to_i'
|
||||
|
||||
describe "Float#truncate" do
|
||||
it_behaves_like :float_to_i, :truncate
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "Float#-@" do
|
||||
it "negates self" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "Float#+@" do
|
||||
it "returns the same value with same sign (twos complement)" do
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require File.expand_path('../../../spec_helper', __FILE__)
|
||||
require_relative '../../spec_helper'
|
||||
|
||||
describe "Float#zero?" do
|
||||
it "returns true if self is 0.0" do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue