Sha256: e3eb638389fc7c875c7e1fe0b8cee2a8a49a0f58c0b7c971dcca04da9c395b59

Contents?: true

Size: 1014 Bytes

Versions: 100

Compression:

Stored size: 1014 Bytes

Contents

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

class TC_FXTreeListBox < Fox::TestCase
  include Fox


  def setup
    super(self.class.name)
    @treeListBox = FXTreeListBox.new(mainWindow)
  end

  def test_sortRootItems
    @treeListBox.appendItem(nil, "B")
    @treeListBox.appendItem(nil, "A")
    @treeListBox.appendItem(nil, "C")
    @treeListBox.sortRootItems
    assert_equal("A", @treeListBox.firstItem.text)
    assert_equal("B", @treeListBox.firstItem.next.text)
    assert_equal("C", @treeListBox.lastItem.text)
  end

  def test_each_for_empty_list
    count = 0
    @treeListBox.each { |item| count += 1 }
    assert_equal(0, count, "count for empty list should be zero")
  end

  def test_each
    @treeListBox.appendItem(nil, "1")
    @treeListBox.appendItem(nil, "2")
    @treeListBox.appendItem(nil, "3")
    @treeListBox.appendItem(nil, "4")
    count = 0
    @treeListBox.each { |item| count += 1 }
    assert_equal(4, count, "count didn't match expected number of items")
  end

end

Version data entries

100 entries across 100 versions & 1 rubygems

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