Codebase list ruby-fxruby / 99106367-7b22-459c-852e-340b299c9f5f/upstream/1.6.45+git20221125.1.7d76b2a test / TC_FXScrollArea.rb
99106367-7b22-459c-852e-340b299c9f5f/upstream/1.6.45+git20221125.1.7d76b2a

Tree @99106367-7b22-459c-852e-340b299c9f5f/upstream/1.6.45+git20221125.1.7d76b2a (Download .tar.gz)

TC_FXScrollArea.rb @99106367-7b22-459c-852e-340b299c9f5f/upstream/1.6.45+git20221125.1.7d76b2araw · history · blame

require 'test/unit'
require 'fox16'
require 'testcase'

class TC_FXScrollArea < Fox::TestCase
  include Fox

  def setup
    super(self.class.name)
    @scrollArea = FXScrollArea.new(mainWindow)
  end

  def test_nil_parent_raises_argument_error
    assert_raise(ArgumentError){ FXScrollArea.new(nil) }
  end

  def test_position_get
    pos = @scrollArea.position
    assert_instance_of(Array, pos)
    assert_equal(2, pos.size)
    assert_kind_of(Integer, pos[0])
    assert_kind_of(Integer, pos[1])
  end

  def test_setPosition
    @scrollArea.setPosition(0, 0)
  end

  def test_position_move_and_resize
    @scrollArea.position(0, 0, 1, 1)
  end
end