Sha256: 8a1656be033a727cc5643232431e5e035b25b8ad387ade89d8afa0cbe8f2a422

Contents?: true

Size: 1.48 KB

Versions: 38

Compression:

Stored size: 1.48 KB

Contents

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

include Fox

class TC_FXMenuRadio < TestCase
  def setup
    super(self.class.name)
    @menuRadio = FXMenuRadio.new(mainWindow, "menuRadio")
  end
  
  def test_setCheck_TRUE
    @menuRadio.check = Fox::TRUE
    assert_equal(true, @menuRadio.check)
    assert_equal(Fox::TRUE, @menuRadio.checkState)
    assert(@menuRadio.checked?)
    assert(!@menuRadio.unchecked?)
    assert(!@menuRadio.maybe?)
  end
  
  def test_setCheck_FALSE
    @menuRadio.check = Fox::FALSE
    assert_equal(false, @menuRadio.check)
    assert_equal(Fox::FALSE, @menuRadio.checkState)
    assert(!@menuRadio.checked?)
    assert(@menuRadio.unchecked?)
    assert(!@menuRadio.maybe?)
  end
  
  def test_setCheck_MAYBE
    @menuRadio.check = Fox::MAYBE
    assert_equal(true, @menuRadio.check) # this is not a typo!
    assert_equal(Fox::MAYBE, @menuRadio.checkState)
    assert(!@menuRadio.checked?)
    assert(!@menuRadio.unchecked?)
    assert(@menuRadio.maybe?)
  end
  
  def test_setCheck_true
    @menuRadio.check = true
    assert_equal(true, @menuRadio.check)
    assert_equal(Fox::TRUE, @menuRadio.checkState)
    assert(@menuRadio.checked?)
    assert(!@menuRadio.unchecked?)
    assert(!@menuRadio.maybe?)
  end
  
  def test_setCheck_false
    @menuRadio.check = false
    assert_equal(false, @menuRadio.check)
    assert_equal(Fox::FALSE, @menuRadio.checkState)
    assert(!@menuRadio.checked?)
    assert(@menuRadio.unchecked?)
    assert(!@menuRadio.maybe?)
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

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