File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -192,7 +192,7 @@ def test_extract_call_linear_performance
192192 def test_clock_res
193193 clockres = %w[
194194 CLOCK_THREAD_CPUTIME_ID CLOCK_PROCESS_CPUTIME_ID
195- CLOCK_MONOTONIC FOO
195+ CLOCK_MONOTONIC
196196 ] . map do |c |
197197 begin
198198 clk = Process . const_get c
@@ -204,6 +204,16 @@ def test_clock_res
204204 assert_equal ( "clocktime" , clockres . inspect )
205205 end
206206
207+ def test_clock_sym_val
208+ codes = %w[
209+ Process.clock_getres(Process::CLOCK_MONOTONIC)
210+ Process.clock_getres(:CLOCK_MONOTONIC)
211+ Process.clock_gettime(Process::CLOCK_MONOTONIC)
212+ Process.clock_gettime(:CLOCK_MONOTONIC)
213+ ]
214+ assert_equal ( 'result' , codes . to_h { |code | [ code , eval ( code ) ] } )
215+ end
216+
207217 def test_clock_actual_res
208218 clockres = %w[
209219 CLOCK_THREAD_CPUTIME_ID CLOCK_PROCESS_CPUTIME_ID
You can’t perform that action at this time.
0 commit comments