Sha256: 76f36421a3aad5a4858c655b8f30872aeb6e52a2c6bdf90e47e729b41e2457ee

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_FXRadioButton < TestCase
  def setup
    super(self.class.name)
    @radioButton = FXRadioButton.new(mainWindow, "cbText")
  end

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

Version data entries

38 entries across 38 versions & 1 rubygems

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