diff options
author | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-12-29 00:22:52 +0000 |
---|---|---|
committer | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-12-29 00:22:52 +0000 |
commit | 2076c2c3c401d9ab9324468818bbc46d4e4b870a (patch) | |
tree | 1697bf7d3f434e49cafd8a8c1579f2d065a7de56 /spec/ruby/core/process/clock_gettime_spec.rb | |
parent | 548defb608847973e78462a38c8418f90dce9911 (diff) | |
download | ruby-2076c2c3c401d9ab9324468818bbc46d4e4b870a.tar.gz |
Update to ruby/spec@944ea57
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/ruby/core/process/clock_gettime_spec.rb')
-rw-r--r-- | spec/ruby/core/process/clock_gettime_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/ruby/core/process/clock_gettime_spec.rb b/spec/ruby/core/process/clock_gettime_spec.rb index 165f0db730..558e4fe717 100644 --- a/spec/ruby/core/process/clock_gettime_spec.rb +++ b/spec/ruby/core/process/clock_gettime_spec.rb @@ -1,6 +1,14 @@ require_relative '../../spec_helper' describe "Process.clock_gettime" do + platform_is_not :windows do + it 'can be called with all declared clocks' do + Process.constants.select { |c| c.to_s.start_with?('CLOCK_') }.each do |c| + Process.clock_gettime(Process.const_get(c)).should be_an_instance_of(Float) + end + end + end + describe 'time units' do it 'handles a fixed set of time units' do [:nanosecond, :microsecond, :millisecond, :second].each do |unit| |