Codebase list ruby-fxruby / 42285a56-c0e4-43cb-8673-97d97da4ddc4/upstream/1.6.45+git20221125.1.7d76b2a test / TC_FXWindow.rb
42285a56-c0e4-43cb-8673-97d97da4ddc4/upstream/1.6.45+git20221125.1.7d76b2a

Tree @42285a56-c0e4-43cb-8673-97d97da4ddc4/upstream/1.6.45+git20221125.1.7d76b2a (Download .tar.gz)

TC_FXWindow.rb @42285a56-c0e4-43cb-8673-97d97da4ddc4/upstream/1.6.45+git20221125.1.7d76b2a

ddfc60e
 
 
 
 
 
 
 
 
 
 
 
 
 
a045fea
ddfc60e
 
 
 
 
 
 
 
 
 
 
require 'test/unit'
require 'fox16'
require 'testcase'

class TC_FXWindow < Fox::TestCase
  include Fox

  def setup
    super(self.class.name)
    @window = FXWindow.new(mainWindow)
  end

  def test_width_accessor
    pos = @window.width
    assert_kind_of(Integer, pos)
    @window.width = pos + 1
    assert_equal(pos + 1, @window.width)
    @window.width = pos + 2.7
    assert_equal(pos + 2, @window.width)
    assert_kind_of(Integer, @window.width)
  end

  def test_width_invalid
    assert_raise(TypeError){ @window.width = nil }
  end
end