Sha256: 329db5cb3c3cefecf0ad63ca783a4da960728baa71fc63dd867bfc81d9cf2c28

Contents?: true

Size: 838 Bytes

Versions: 4

Compression:

Stored size: 838 Bytes

Contents

require 'test/unit'

require 'fox16'

class TC_FXTopWindow < Test::Unit::TestCase
  include Fox

  def setup
    if FXApp.instance.nil?
      @app = FXApp.new('TC_FXTopWindow', 'FXRuby')
      @app.init([])
    else
      @app = FXApp.instance
    end
    @mainWin = FXMainWindow.new(@app, 'TC_FXButton')
  end
  
  def test_new
    # Free-floating
    top1 = FXTopWindow.new(@app, "top1", nil, nil, DECOR_ALL, 0, 0, 0, 0,
      DEFAULT_PAD, DEFAULT_PAD, DEFAULT_PAD, DEFAULT_PAD,
      DEFAULT_SPACING, DEFAULT_SPACING)
    assert_equal("top1", top1.title)
      
    # Owned
    top2 = FXTopWindow.new(@mainWin, "top2", nil, nil, DECOR_ALL, 0, 0, 0, 0,
      DEFAULT_PAD, DEFAULT_PAD, DEFAULT_PAD, DEFAULT_PAD,
      DEFAULT_SPACING, DEFAULT_SPACING)
    assert_same(@mainWin, top2.owner)
    assert_equal("top2", top2.title)
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
fxruby-1.6.22.pre2-x86-mingw32 test/TC_FXTopWindow.rb
fxruby-1.6.22.pre2 test/TC_FXTopWindow.rb
fxrubi-1.6.22.pre1-x86-mingw32 test/TC_FXTopWindow.rb
fxrubi-1.6.22.pre1 test/TC_FXTopWindow.rb