event()
click to toggle source
setup()
click to toggle source
def setup
@touch = Gdk::EventTouch.new(:touch_begin)
end
test_axes()
click to toggle source
def test_axes
assert_nothing_raised do
@touch.axes
end
end
test_device()
click to toggle source
def test_device
assert_nothing_raised do
@touch.device
end
end
test_emulating_pointer()
click to toggle source
def test_emulating_pointer
assert_boolean(@touch.emulating_pointer?)
end
test_state()
click to toggle source
def test_state
assert_not_nil(@touch.state)
end
test_time()
click to toggle source
def test_time
assert_kind_of(Integer, @touch.time)
end
test_touch_begin()
click to toggle source
def test_touch_begin
assert_equal("GDK_TOUCH_BEGIN",
Gdk::EventTouch.new(:touch_begin).type.name)
end
test_touch_cancel()
click to toggle source
def test_touch_cancel
assert_equal("GDK_TOUCH_CANCEL",
Gdk::EventTouch.new(:touch_cancel).type.name)
end
test_touch_end()
click to toggle source
def test_touch_end
assert_equal("GDK_TOUCH_END",
Gdk::EventTouch.new(:touch_end).type.name)
end
test_touch_update()
click to toggle source
def test_touch_update
assert_equal("GDK_TOUCH_UPDATE",
Gdk::EventTouch.new(:touch_update).type.name)
end
test_x()
click to toggle source
def test_x
assert_kind_of(Float, @touch.x)
end
test_x_root()
click to toggle source
def test_x_root
assert_kind_of(Float, @touch.x_root)
end
test_y()
click to toggle source
def test_y
assert_kind_of(Float, @touch.y)
end
test_y_root()
click to toggle source
def test_y_root
assert_kind_of(Float, @touch.y_root)
end