Sha256: 5aa33201c7c0c2da0adc2cdd0709a1b5dad1adc3888a8ead5656dde95afcb1da

Contents?: true

Size: 598 Bytes

Versions: 20

Compression:

Stored size: 598 Bytes

Contents

# Copyright (c) 2023 M.J.N. Corino, The Netherlands
#
# This software is released under the MIT license.

require 'test/unit'
require 'wx'

class TestApp < Test::Unit::TestCase

  class TestFrame < Wx::Frame
    def initialize
      super(nil, -1, '')
      evt_paint { on_paint }
    end

    def on_paint
      paint {}
      close
    end
  end

  class TestApp < Wx::App
    def on_init
      TestFrame.new.show
    end

    def on_exit
      raise RuntimeError, 'on_exit exception'
    end
  end

  def test_self_closing_frame
    assert_raise_kind_of(RuntimeError) { TestApp.run }
  end

end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
wxruby3-1.5.1 tests/test_app_exit_exception.rb
wxruby3-1.5.0 tests/test_app_exit_exception.rb
wxruby3-1.4.2 tests/test_app_exit_exception.rb
wxruby3-1.4.1 tests/test_app_exit_exception.rb
wxruby3-1.4.0 tests/test_app_exit_exception.rb
wxruby3-1.3.1 tests/test_app_exit_exception.rb
wxruby3-1.3.0 tests/test_app_exit_exception.rb
wxruby3-1.2.1 tests/test_app_exit_exception.rb
wxruby3-1.2.0 tests/test_app_exit_exception.rb
wxruby3-1.1.2 tests/test_app_exit_exception.rb
wxruby3-1.1.1 tests/test_app_exit_exception.rb
wxruby3-1.1.0 tests/test_app_exit_exception.rb
wxruby3-1.0.1 tests/test_app_exit_exception.rb
wxruby3-0.9.8 tests/test_app_exit_exception.rb
wxruby3-0.9.7 tests/test_app_exit_exception.rb
wxruby3-0.9.5 tests/test_app_exit_exception.rb
wxruby3-0.9.4 tests/test_app_exit_exception.rb
wxruby3-0.9.3 tests/test_app_exit_exception.rb
wxruby3-0.9.2 tests/test_app_exit_exception.rb
wxruby3-0.9.1 tests/test_app_exit_exception.rb