Sha256: 924891d2390a1ad111250144b43213f7f4b814086e92ef519b8289f72dd92141
Contents?: true
Size: 1.32 KB
Versions: 3
Compression:
Stored size: 1.32 KB
Contents
require_relative './lib/wxapp_runner' class EventTests < Test::Unit::TestCase def test_event evt = Wx::Event.new(100, 1) assert_equal(100, evt.event_type) assert_equal(1, evt.id) assert(!evt.should_propagate) evt.skip assert(evt.skipped) evt_dup = evt.clone assert_not_equal(evt, evt_dup) assert_equal(evt.event_type, evt_dup.event_type) assert_equal(evt.id, evt_dup.id) end def test_command_event evt = Wx::CommandEvent.new(100, 1) assert_equal(100, evt.event_type) assert_equal(1, evt.id) assert(evt.should_propagate) evt.skip assert(evt.skipped) evt.string = 'CommandEvent Test' assert_equal('CommandEvent Test', evt.string) evt_dup = evt.clone assert_not_equal(evt, evt_dup) assert_equal(evt.event_type, evt_dup.event_type) assert_equal(evt.id, evt_dup.id) assert_equal(evt.string, evt_dup.string) end def test_event_clone evt = Wx::MouseEvent.new(Wx::EVT_LEFT_DOWN) assert_equal(Wx::EVT_LEFT_DOWN, evt.event_type) evt.position = Wx::Point.new(333,666) assert_equal(Wx::Point.new(333,666), evt.position) evt_dup = evt.clone assert_instance_of(Wx::MouseEvent, evt_dup) assert_not_equal(evt, evt_dup) assert_equal(evt.event_type, evt_dup.event_type) assert_equal(evt.position, evt_dup.position) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
wxruby3-0.9.0.pre.rc.3 | tests/test_events.rb |
wxruby3-0.9.0.pre.rc.2 | tests/test_events.rb |
wxruby3-0.9.0.pre.rc.1 | tests/test_events.rb |