Sha256: da55e7af4250e66386b334db7b8085b3aa8f41e932a92cff14f77b6b794bdd0b

Contents?: true

Size: 628 Bytes

Versions: 5

Compression:

Stored size: 628 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

5 entries across 5 versions & 1 rubygems

Version Path
wxruby3-0.9.7-x64-mingw-ucrt tests/testapp_noframe.rb
wxruby3-0.9.5-x64-mingw-ucrt tests/testapp_noframe.rb
wxruby3-0.9.4-x64-mingw-ucrt tests/testapp_noframe.rb
wxruby3-0.9.3-x64-mingw-ucrt tests/testapp_noframe.rb
wxruby3-0.9.2-x64-mingw-ucrt tests/testapp_noframe.rb