Sha256: 8caf48a1cb2375be2e02464414b05877587dc05eba43ed64ca9cbf125413e575

Contents?: true

Size: 616 Bytes

Versions: 3

Compression:

Stored size: 616 Bytes

Contents

#!/usr/bin/env ruby
require File.expand_path("../../helper", __FILE__)

# Test catchpoint in C ruby_debug extension.
  
class TestRubyDebugCatchpoint < Test::Unit::TestCase
  def test_catchpoints
    assert_raise(RuntimeError) {Debugger.catchpoints}
    Debugger.start_
    assert_equal({}, Debugger.catchpoints)
    Debugger.add_catchpoint('ZeroDivisionError')
    assert_equal({'ZeroDivisionError' => 0}, Debugger.catchpoints)
    Debugger.add_catchpoint('RuntimeError')
    assert_equal(['RuntimeError', 'ZeroDivisionError'], 
                 Debugger.catchpoints.keys.sort)
  ensure
    Debugger.stop
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
ruby-debug-0.10.5.rc1 test/base/catchpoint.rb
ruby-debug-base-0.10.5.rc1-java test/base/catchpoint.rb
ruby-debug-base-0.10.5.rc1 test/base/catchpoint.rb