Sha256: 5f524113a8d7290d7522b4624b88cbfd6cecbfe61604b369d3452ae47438dbaa

Contents?: true

Size: 1013 Bytes

Versions: 27

Compression:

Stored size: 1013 Bytes

Contents

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

include Fox

class TC_FXTreeListBox < TestCase
  
  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

27 entries across 27 versions & 1 rubygems

Version Path
fxruby-1.6.20-x86-mingw32 test/TC_FXTreeListBox.rb
fxruby-1.6.20-x86-linux test/TC_FXTreeListBox.rb
fxruby-1.6.20 test/TC_FXTreeListBox.rb
fxruby-1.6.20-universal-darwin-10 test/TC_FXTreeListBox.rb
fxruby-1.6.19-x86-mingw32 tests/TC_FXTreeListBox.rb
fxruby-1.6.14-mswin32 tests/TC_FXTreeListBox.rb
fxruby-1.6.13-mswin32 tests/TC_FXTreeListBox.rb
fxruby-1.6.11 tests/TC_FXTreeListBox.rb
fxruby-1.6.12 tests/TC_FXTreeListBox.rb
fxruby-1.6.13 tests/TC_FXTreeListBox.rb
fxruby-1.6.14-universal-darwin-9 tests/TC_FXTreeListBox.rb
fxruby-1.6.15-universal-darwin-9 tests/TC_FXTreeListBox.rb
fxruby-1.6.14 tests/TC_FXTreeListBox.rb
fxruby-1.6.15 tests/TC_FXTreeListBox.rb
fxruby-1.6.15-x86-mswin32-60 tests/TC_FXTreeListBox.rb
fxruby-1.6.16-universal-darwin-9 tests/TC_FXTreeListBox.rb
fxruby-1.6.16-x86-mswin32-60 tests/TC_FXTreeListBox.rb
fxruby-1.6.17-universal-darwin-9 tests/TC_FXTreeListBox.rb
fxruby-1.6.16 tests/TC_FXTreeListBox.rb
fxruby-1.6.17-x86-mswin32-60 tests/TC_FXTreeListBox.rb