Skip to content

Commit 35ade36

Browse files
committed
check clock res
1 parent ffb89b0 commit 35ade36

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/rdoc/rdoc_comment_test.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,21 @@ def test_extract_call_linear_performance
189189
end
190190
end
191191

192+
def test_clock_res
193+
clockres = %w[
194+
CLOCK_THREAD_CPUTIME_ID CLOCK_PROCESS_CPUTIME_ID
195+
CLOCK_MONOTONIC FOO
196+
].map do |c|
197+
begin
198+
clk = Process.const_get c
199+
Process.clock_getres(clk)
200+
rescue => e
201+
e.message
202+
end
203+
end
204+
assert_equal("clocktime", clockres.inspect)
205+
end
206+
192207
def test_force_encoding
193208
@comment = RDoc::Encoding.change_encoding @comment, Encoding::UTF_8
194209

0 commit comments

Comments
 (0)