summaryrefslogtreecommitdiffstats
path: root/spec/ecore_spec.rb
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2011-08-18 10:36:24 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2011-08-18 10:36:24 +0200
commit463e3906bdf41951e35269abdbd4341d91fdf5f6 (patch)
treeec7c5ab63adfaac21bd4d1a9ba6ded90659cfd4f /spec/ecore_spec.rb
parentdc9d009af086a84b06ea1a834457d083a83d6e00 (diff)
downloadffi-efl-463e3906bdf41951e35269abdbd4341d91fdf5f6.zip
ffi-efl-463e3906bdf41951e35269abdbd4341d91fdf5f6.tar.gz
clean up ecore_event_handler specs
Diffstat (limited to 'spec/ecore_spec.rb')
-rw-r--r--spec/ecore_spec.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/ecore_spec.rb b/spec/ecore_spec.rb
index 66f9d4c..86475ae 100644
--- a/spec/ecore_spec.rb
+++ b/spec/ecore_spec.rb
@@ -60,6 +60,7 @@ describe "Efl::Ecore #{Efl::Ecore.version.full}" do
ecore_evt = Ecore.event_add Ecore::EVENT_SIGNAL_USER, evt, EVENT_FREE_CB, NONE
ecore_evt.null?.should be_false
Ecore.main_loop_begin # process event
+ Ecore.event_handler_del(evt_handler).address.should == OK.address
end
#
it "should be able to get and set event handler data" do
@@ -73,6 +74,7 @@ describe "Efl::Ecore #{Efl::Ecore.version.full}" do
ecore_evt = Ecore.event_add Ecore::EVENT_SIGNAL_USER, evt, EVENT_FREE_CB, NONE
ecore_evt.null?.should be_false
Ecore.main_loop_begin # process event
+ Ecore.event_handler_del(evt_handler).address.should == OK.address
end
#
it "should be able to create new event type" do
@@ -111,7 +113,7 @@ describe "Efl::Ecore #{Efl::Ecore.version.full}" do
loop_data.read_string.should == "loop_data"
end
filter = Ecore.event_filter_add start_cb, filter_cb, end_cb, OK
- Ecore.event_handler_add Ecore::EVENT_SIGNAL_USER, USER_SIGNAL_CB, OK
+ evt_handler = Ecore.event_handler_add Ecore::EVENT_SIGNAL_USER, USER_SIGNAL_CB, OK
e1 = FFI::MemoryPointer.new(:int)
e1.write_int 69
evt1 = Ecore.event_add Ecore::EVENT_SIGNAL_USER, e1, event_free_cb, KO
@@ -120,6 +122,12 @@ describe "Efl::Ecore #{Efl::Ecore.version.full}" do
evt2 = Ecore.event_add Ecore::EVENT_SIGNAL_USER, e2, EVENT_FREE_CB, NONE
Ecore.event_filter_del(filter).address.should == OK.address
evt2 = Ecore.event_add Ecore::EVENT_SIGNAL_USER, e2, EVENT_FREE_CB, NONE
+ Ecore.event_handler_del(evt_handler).address.should == OK.address
+ Ecore.main_loop_iterate
+ Ecore.main_loop_iterate
+ Ecore.main_loop_iterate
+ e1.free
+ e2.free
end
#
describe Efl::Ecore::REcorePipe do