diff options
Diffstat (limited to 'test/dtrace/test_function_entry.rb')
| -rw-r--r-- | test/dtrace/test_function_entry.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/test/dtrace/test_function_entry.rb b/test/dtrace/test_function_entry.rb index c7bf478643..e2395ab15a 100644 --- a/test/dtrace/test_function_entry.rb +++ b/test/dtrace/test_function_entry.rb @@ -1,4 +1,5 @@ -require 'dtrace/helper' +# frozen_string_literal: false +require_relative 'helper' module DTrace class TestFunctionEntry < TestCase @@ -16,8 +17,8 @@ ruby$target:::method-entry row.first == 'Foo' && row[1] == 'foo' } - assert_equal 10, foo_calls.length - line = '2' + assert_equal 10, foo_calls.length, probes + line = '3' foo_calls.each { |f| assert_equal line, f[3] } foo_calls.each { |f| assert_equal rb_file, f[2] } } @@ -37,8 +38,8 @@ ruby$target:::method-return row.first == 'Foo' && row[1] == 'foo' } - assert_equal 10, foo_calls.length - line = '2' + assert_equal 10, foo_calls.length, probes.inspect + line = '3' foo_calls.each { |f| assert_equal line, f[3] } foo_calls.each { |f| assert_equal rb_file, f[2] } } @@ -76,6 +77,7 @@ ruby$target:::method-return private def ruby_program <<-eoruby + TracePoint.new{}.__enable(nil, nil, Thread.current) class Foo def foo; end end |
