Sha256: 3075309fc0cff133cd325566d46a1917e6eb07f2df6619e68027b51d351a24fa

Contents?: true

Size: 680 Bytes

Versions: 20

Compression:

Stored size: 680 Bytes

Contents

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

require_relative './lib/wxframe_runner'

class BookCtrlTests < WxRuby::Test::GUITests

  def setup
    super
    @book = Wx::Choicebook.new(frame_win, name: 'ChoiceBook')
  end

  def cleanup
    @book.destroy
    super
    GC.start
  end

  attr_reader :book

  def test_control_sizer
    btn = Wx::Button.new(book, Wx::ID_ANY, 'First')
    # issue #199 : returning the control sizer should not cause it to be owned by Ruby
    #              because that would cause double deletes
    book.get_control_sizer.add(btn, Wx::SizerFlags.new.expand.border(Wx::ALL))
  end

end

Version data entries

20 entries across 20 versions & 1 rubygems

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