Sha256: ecd4b3cc71ffb00c02c73f2ba205ac497ad606532800ce71be84e41e8f971c0e

Contents?: true

Size: 962 Bytes

Versions: 30

Compression:

Stored size: 962 Bytes

Contents

require 'test/unit'

require 'fox16'

include Fox

class TC_FXAccelTable < Test::Unit::TestCase
  def setup
    @accel = FXAccelTable.new
  end

  def test_addAccel
    hotkey = fxparseHotKey('&A')
    target = FXObject.new
    seldn, selup = 0, 0
    @accel.addAccel(hotkey)
    @accel.addAccel(hotkey, target)
    @accel.addAccel(hotkey, target, seldn)
    @accel.addAccel(hotkey, target, seldn, selup)
  end
  
  def test_hasAccel
    hotkey = fxparseHotKey('&b')
    assert(!@accel.hasAccel?(hotkey))
    @accel.addAccel(hotkey)
    assert(@accel.hasAccel?(hotkey))
  end
  
  def test_targetOfAccel
    hotkey = fxparseHotKey("&x")
    target = FXObject.new
    @accel.addAccel(hotkey, target)
    assert_same(target, @accel.targetOfAccel(hotkey))
  end
  
  def test_removeAccel
    hotkey = fxparseHotKey('&b')
    @accel.addAccel(hotkey)
    assert(@accel.hasAccel?(hotkey))
    @accel.removeAccel(hotkey)
    assert(!@accel.hasAccel?(hotkey))
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
fxruby-1.6.14-mswin32 tests/TC_FXAccelTable.rb
fxruby-1.6.13-mswin32 tests/TC_FXAccelTable.rb
fxruby-1.6.0 tests/TC_FXAccelTable.rb
fxruby-1.6.1 tests/TC_FXAccelTable.rb
fxruby-1.6.11 tests/TC_FXAccelTable.rb
fxruby-1.6.10 tests/TC_FXAccelTable.rb
fxruby-1.6.12 tests/TC_FXAccelTable.rb
fxruby-1.6.13 tests/TC_FXAccelTable.rb
fxruby-1.6.14-universal-darwin-9 tests/TC_FXAccelTable.rb
fxruby-1.6.14 tests/TC_FXAccelTable.rb
fxruby-1.6.15-universal-darwin-9 tests/TC_FXAccelTable.rb
fxruby-1.6.15 tests/TC_FXAccelTable.rb
fxruby-1.6.15-x86-mswin32-60 tests/TC_FXAccelTable.rb
fxruby-1.6.16-universal-darwin-9 tests/TC_FXAccelTable.rb
fxruby-1.6.16-x86-mswin32-60 tests/TC_FXAccelTable.rb
fxruby-1.6.17-universal-darwin-9 tests/TC_FXAccelTable.rb
fxruby-1.6.16 tests/TC_FXAccelTable.rb
fxruby-1.6.17-x86-mswin32-60 tests/TC_FXAccelTable.rb
fxruby-1.6.17 tests/TC_FXAccelTable.rb
fxruby-1.6.18-universal-darwin-9 tests/TC_FXAccelTable.rb