File: test_truffleruby.rb

package info (click to toggle)
ruby-stackprof 0.2.26-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 552 kB
  • sloc: python: 2,494; ruby: 1,264; perl: 920; ansic: 761; javascript: 735; makefile: 4
file content (18 lines) | stat: -rw-r--r-- 444 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
$:.unshift File.expand_path('../../lib', __FILE__)
require 'stackprof'
require 'minitest/autorun'

if RUBY_ENGINE == 'truffleruby'
  class StackProfTruffleRubyTest < Minitest::Test
    def test_error
      error = assert_raises RuntimeError do
        StackProf.run(mode: :cpu) do
          unreacheable
        end
      end

      assert_match(/TruffleRuby/, error.message)
      assert_match(/--cpusampler/, error.message)
    end
  end
end