Sha256: 1180b17abcd1964c554f5bbf15d02e16b715058898e958e96a51ef75e04cb0af

Contents?: true

Size: 601 Bytes

Versions: 14

Compression:

Stored size: 601 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 AppReturnsFalseFromInit < Wx::App
    attr_reader :did_call_on_init, :the_app_name
    
    def on_init
        @did_call_on_init = true
        @the_app_name = self.get_app_name
        return false
    end
    
end

class TestApp < Test::Unit::TestCase
  def test_return_false_from_init
    o = AppReturnsFalseFromInit.new
    o.run
    assert(o.did_call_on_init, "didn't call on_init?")
    assert_equal("testapp_noframe", o.the_app_name)
  end
  
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
wxruby3-1.3.1 tests/testapp_noframe.rb
wxruby3-1.3.0 tests/testapp_noframe.rb
wxruby3-1.2.1 tests/testapp_noframe.rb
wxruby3-1.2.0 tests/testapp_noframe.rb
wxruby3-1.1.2 tests/testapp_noframe.rb
wxruby3-1.1.1 tests/testapp_noframe.rb
wxruby3-1.1.0 tests/testapp_noframe.rb
wxruby3-1.0.1 tests/testapp_noframe.rb
wxruby3-0.9.8 tests/testapp_noframe.rb
wxruby3-0.9.7 tests/testapp_noframe.rb
wxruby3-0.9.5 tests/testapp_noframe.rb
wxruby3-0.9.4 tests/testapp_noframe.rb
wxruby3-0.9.3 tests/testapp_noframe.rb
wxruby3-0.9.2 tests/testapp_noframe.rb