Sha256: f226563a6a149c997cb77a123c708ad5b2950a9afddc68c65520018bb5bf594e

Contents?: true

Size: 951 Bytes

Versions: 1

Compression:

Stored size: 951 Bytes

Contents

require_relative 'test_helper.rb'

require 'sequel/core'
require 'sequel/extensions/inflector'

module Sequel; end

class TestKeyEvent < Test::Unit::TestCase

  #~ Qt::NoModifier	0x00000000	No modifier key is pressed.
  #~ Qt::ShiftModifier	0x02000000	A Shift key on the keyboard is pressed.
  #~ Qt::ControlModifier	0x04000000	A Ctrl key on the keyboard is pressed.
  #~ Qt::AltModifier	0x08000000	An Alt key on the keyboard is pressed.
  #~ Qt::MetaModifier	0x10000000	A Meta key on the keyboard is pressed.
  #~ Qt::KeypadModifier	0x20000000	A keypad button is pressed.
  #~ Qt::GroupSwitchModifier
  def setup
    @key_event = Qt::KeyEvent.new( Qt::Event::KeyPress, Qt::Key_Down, Qt::NoModifier )
  end

  def test_camelize
    assert "somstring".respond_to?( :camelize ), "String has no camelize method"
  end

  should 'have the key? methods' do
    assert @key_event.key? 'down'
    assert @key_event.down?, "Key is not Qt::Key_Down"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
qtext-0.6.9 test/test_key_event.rb