Sha256: 815c99019baf12a60c09cc82cedc03326eb03a29e40f7bc8a01e81d57e42de64

Contents?: true

Size: 949 Bytes

Versions: 92

Compression:

Stored size: 949 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_nil_app_raises_argument_error
    assert_raise(ArgumentError){ FXTopWindow.new(nil, '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

92 entries across 92 versions & 1 rubygems

Version Path
fxruby-1.6.48 test/TC_FXTopWindow.rb
fxruby-1.6.48-x64-mingw32 test/TC_FXTopWindow.rb
fxruby-1.6.48-x64-mingw-ucrt test/TC_FXTopWindow.rb
fxruby-1.6.48-x86-mingw32 test/TC_FXTopWindow.rb
fxruby-1.6.47 test/TC_FXTopWindow.rb
fxruby-1.6.47-x64-mingw-ucrt test/TC_FXTopWindow.rb
fxruby-1.6.47-x64-mingw32 test/TC_FXTopWindow.rb
fxruby-1.6.47-x86-mingw32 test/TC_FXTopWindow.rb
fxruby-1.6.46 test/TC_FXTopWindow.rb
fxruby-1.6.46-x64-mingw32 test/TC_FXTopWindow.rb
fxruby-1.6.46-x64-mingw-ucrt test/TC_FXTopWindow.rb
fxruby-1.6.46-x86-mingw32 test/TC_FXTopWindow.rb
fxruby-1.6.45 test/TC_FXTopWindow.rb
fxruby-1.6.45-x64-mingw32 test/TC_FXTopWindow.rb
fxruby-1.6.45-x64-mingw-ucrt test/TC_FXTopWindow.rb
fxruby-1.6.45-x86-mingw32 test/TC_FXTopWindow.rb
fxruby-1.6.44 test/TC_FXTopWindow.rb
fxruby-1.6.44-x64-mingw32 test/TC_FXTopWindow.rb
fxruby-1.6.44-x86-mingw32 test/TC_FXTopWindow.rb
fxruby-1.6.43 test/TC_FXTopWindow.rb