Skip to content

Commit e253e8c

Browse files
committed
allcock sym val
1 parent a87b843 commit e253e8c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

test/rdoc/rdoc_comment_test.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,12 +206,20 @@ def test_clock_res
206206

207207
def test_clock_sym_val
208208
codes = %w[
209+
Process.clock_getres(Process::CLOCK_THREAD_CPUTIME_ID)
210+
Process.clock_getres(:CLOCK_THREAD_CPUTIME_ID)
211+
Process.clock_gettime(Process::CLOCK_THREAD_CPUTIME_ID)
212+
Process.clock_gettime(:CLOCK_THREAD_CPUTIME_ID)
213+
Process.clock_getres(Process::CLOCK_PROCESS_CPUTIME_ID)
214+
Process.clock_getres(:CLOCK_PROCESS_CPUTIME_ID)
215+
Process.clock_gettime(Process::CLOCK_PROCESS_CPUTIME_ID)
216+
Process.clock_gettime(:CLOCK_PROCESS_CPUTIME_ID)
209217
Process.clock_getres(Process::CLOCK_MONOTONIC)
210218
Process.clock_getres(:CLOCK_MONOTONIC)
211219
Process.clock_gettime(Process::CLOCK_MONOTONIC)
212220
Process.clock_gettime(:CLOCK_MONOTONIC)
213221
]
214-
assert_equal('result', codes.to_h{|code| [code, eval(code)]})
222+
assert_equal('result', codes.to_h{|code| [code, (eval(code) rescue $!.to_s)]})
215223
end
216224

217225
def test_clock_actual_res

0 commit comments

Comments
 (0)