diff options
author | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-05-14 14:09:56 +0000 |
---|---|---|
committer | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-05-14 14:09:56 +0000 |
commit | a5b83b03adc3f457f8e148fe41b1ff0b3e29ca69 (patch) | |
tree | b04c8801ead64cdd408f383166b88a693bfb0c10 /spec/rubyspec/optional | |
parent | d593aed7b7ffafbd81d0ec7cf306f10ac91830e7 (diff) |
Update to ruby/spec@032022ca
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/rubyspec/optional')
-rw-r--r-- | spec/rubyspec/optional/capi/bignum_spec.rb | 7 | ||||
-rw-r--r-- | spec/rubyspec/optional/capi/mutex_spec.rb | 2 | ||||
-rw-r--r-- | spec/rubyspec/optional/capi/spec_helper.rb | 20 |
3 files changed, 3 insertions, 26 deletions
diff --git a/spec/rubyspec/optional/capi/bignum_spec.rb b/spec/rubyspec/optional/capi/bignum_spec.rb index 84b5de95c2..59d867cc46 100644 --- a/spec/rubyspec/optional/capi/bignum_spec.rb +++ b/spec/rubyspec/optional/capi/bignum_spec.rb @@ -60,6 +60,7 @@ end unless full_range_longs it "wraps around if passed a negative bignum" do @s.rb_big2ulong(ensure_bignum(@min_long + 1)).should == -(@min_long - 1) + @s.rb_big2ulong(ensure_bignum(@min_long)).should == -(@min_long) end end @@ -67,12 +68,6 @@ end lambda { @s.rb_big2ulong(ensure_bignum(@max_ulong + 1)) }.should raise_error(RangeError) lambda { @s.rb_big2ulong(ensure_bignum(@min_long - 1)) }.should raise_error(RangeError) end - - unless full_range_longs - it "wraps around if passed a negative bignum" do - @s.rb_big2ulong(ensure_bignum(@min_long)).should == -(@min_long) - end - end end describe "rb_big2dbl" do diff --git a/spec/rubyspec/optional/capi/mutex_spec.rb b/spec/rubyspec/optional/capi/mutex_spec.rb index dae300f002..9f0abe1115 100644 --- a/spec/rubyspec/optional/capi/mutex_spec.rb +++ b/spec/rubyspec/optional/capi/mutex_spec.rb @@ -15,7 +15,7 @@ describe "C-API Mutex functions" do end describe "rb_mutex_locked_p" do - it "returns true if the mutex is locked" do + it "returns fakse if the mutex is not locked" do @s.rb_mutex_locked_p(@m).should be_false end diff --git a/spec/rubyspec/optional/capi/spec_helper.rb b/spec/rubyspec/optional/capi/spec_helper.rb index ca0685c9fe..d0534d8ce0 100644 --- a/spec/rubyspec/optional/capi/spec_helper.rb +++ b/spec/rubyspec/optional/capi/spec_helper.rb @@ -6,7 +6,7 @@ require 'fileutils' require 'tmpdir' OBJDIR ||= File.expand_path("../../../ext/#{RUBY_NAME}/#{RUBY_VERSION}", __FILE__) -FileUtils.makedirs(OBJDIR) +mkdir_p(OBJDIR) def extension_path File.expand_path("../ext", __FILE__) @@ -111,24 +111,6 @@ ensure ENV[preloadenv] = preload if preloadenv end -def compile_extension_truffleruby(name) - sulong_config_file = File.join(extension_path, '.jruby-cext-build.yml') - output_file = File.join(object_path, "#{name}_spec.#{RbConfig::CONFIG['DLEXT']}") - - File.open(sulong_config_file, 'w') do |f| - f.puts "src: #{name}_spec.c" - f.puts "out: #{output_file}" - end - - command = ["#{RbConfig::CONFIG['bindir']}/../tool/jt.rb", 'cextc', extension_path] - system(*command) - raise "Compilation of #{extension_path} failed: #{$?}\n#{command.join(' ')}" unless $?.success? - - output_file -ensure - File.delete(sulong_config_file) if File.exist?(sulong_config_file) -end - def compile_truffleruby_extconf_make(name, path, objdir) ext = "#{name}_spec" file = "#{ext}.c" |