mirror of
https://github.com/ruby/ruby.git
synced 2025-09-19 18:43:59 +02:00
* test/ruby/test_process.rb (test_getpriority, test_setpriority): use
PRIO_PROCESS instead of PRIO_USER. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
df5604ce5d
commit
d80a9afb18
2 changed files with 8 additions and 3 deletions
|
@ -946,15 +946,15 @@ class TestProcess < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_getpriority
|
||||
assert_kind_of(Integer, Process.getpriority(Process::PRIO_USER, 0))
|
||||
assert_kind_of(Integer, Process.getpriority(Process::PRIO_PROCESS, $$))
|
||||
rescue NameError, NotImplementedError
|
||||
end
|
||||
|
||||
def test_setpriority
|
||||
if defined? Process::PRIO_USER
|
||||
assert_nothing_raised do
|
||||
pr = Process.getpriority(Process::PRIO_USER, 0)
|
||||
Process.setpriority(Process::PRIO_USER, 0, pr)
|
||||
pr = Process.getpriority(Process::PRIO_PROCESS, $$)
|
||||
Process.setpriority(Process::PRIO_PROCESS, $$, pr)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue