Sha256: 1c01e5df1acbfa0c374f40f4c5b1f0db301ae5c7157c40ec97999d5ace818792

Contents?: true

Size: 1.54 KB

Versions: 38

Compression:

Stored size: 1.54 KB

Contents

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

include Fox

class TC_FXCheckButton < TestCase
  def setup
    super("TC_FXCheckButton")
    @checkButton = FXCheckButton.new(mainWindow, "cbText")
  end

  def test_setCheck_TRUE
    @checkButton.check = Fox::TRUE
    assert_equal(true, @checkButton.check)
    assert_equal(Fox::TRUE, @checkButton.checkState)
    assert(@checkButton.checked?)
    assert(!@checkButton.unchecked?)
    assert(!@checkButton.maybe?)
  end
  
  def test_setCheck_FALSE
    @checkButton.check = Fox::FALSE
    assert_equal(false, @checkButton.check)
    assert_equal(Fox::FALSE, @checkButton.checkState)
    assert(!@checkButton.checked?)
    assert(@checkButton.unchecked?)
    assert(!@checkButton.maybe?)
  end
  
  def test_setCheck_MAYBE
    @checkButton.check = Fox::MAYBE
    assert_equal(true, @checkButton.check) # this is not a typo!
    assert_equal(Fox::MAYBE, @checkButton.checkState)
    assert(!@checkButton.checked?)
    assert(!@checkButton.unchecked?)
    assert(@checkButton.maybe?)
  end
  
  def test_setCheck_true
    @checkButton.check = true
    assert_equal(true, @checkButton.check)
    assert_equal(Fox::TRUE, @checkButton.checkState)
    assert(@checkButton.checked?)
    assert(!@checkButton.unchecked?)
    assert(!@checkButton.maybe?)
  end
  
  def test_setCheck_false
    @checkButton.check = false
    assert_equal(false, @checkButton.check)
    assert_equal(Fox::FALSE, @checkButton.checkState)
    assert(!@checkButton.checked?)
    assert(@checkButton.unchecked?)
    assert(!@checkButton.maybe?)
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

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