Sha256: b55d5f40d044865b0ba4b4de224ed839ff0464f316daae7e2003750f14d4dd68

Contents?: true

Size: 621 Bytes

Versions: 10

Compression:

Stored size: 621 Bytes

Contents

#!/usr/bin/env ruby
require 'test/unit'
require 'ruby_debug'

# Test catchpoint in C ruby_debug extension.

class TestRubyDebugCatchpoint < Test::Unit::TestCase

  # test current_context
  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)
    Debugger.stop
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
debugger-1.2.4 test/base/catchpoint.rb
debugger-1.2.3 test/base/catchpoint.rb
debugger-1.2.2 test/base/catchpoint.rb
debugger-1.2.1 test/base/catchpoint.rb
debugger-1.2.0 test/base/catchpoint.rb
debugger-1.1.4 test/base/catchpoint.rb
debugger-1.1.3 test/base/catchpoint.rb
debugger-1.1.2 test/base/catchpoint.rb
debugger-1.1.1 test/base/catchpoint.rb
debugger-1.1.0 test/base/catchpoint.rb