diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2011-05-08 13:47:51 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2011-05-08 13:47:51 +0200 |
commit | 22c6cdc480b8d422eb39562a6f145b510aa7069a (patch) | |
tree | 903df69d9546fe6728807e649e42d25e10bd17ba /spec | |
parent | 0f86ef56c6e4c044983a52946c1e7a81a2ee9349 (diff) | |
download | ffi-efl-22c6cdc480b8d422eb39562a6f145b510aa7069a.zip ffi-efl-22c6cdc480b8d422eb39562a6f145b510aa7069a.tar.gz |
Efl::Elm::ElmPager class + specs
Diffstat (limited to 'spec')
-rw-r--r-- | spec/elm_spec.rb | 58 |
1 files changed, 53 insertions, 5 deletions
diff --git a/spec/elm_spec.rb b/spec/elm_spec.rb index b5d5140..3f1c76e 100644 --- a/spec/elm_spec.rb +++ b/spec/elm_spec.rb @@ -60,13 +60,13 @@ describe Efl::Elm do end # it "overlay get/set unset" do - @r = @win.evas.object_rectangle_add + r = @win.evas.object_rectangle_add @bg.overlay_get.should==FFI::Pointer::NULL - @bg.overlay_set @r - @bg.overlay_get.should == @r.to_ptr - @bg.overlay_unset.should == @r.to_ptr + @bg.overlay_set r + @bg.overlay_get.should == r.to_ptr + @bg.overlay_unset.should == r.to_ptr @bg.overlay_get.should == FFI::Pointer::NULL - @r.free + r.free end end # @@ -129,6 +129,7 @@ describe Efl::Elm do @lb.slide_duration.should == 3.1415926 end end + # describe Efl::Elm::ElmPager do # before(:all) { @@ -159,5 +160,52 @@ describe Efl::Elm do @p.content_bottom_get.should == @os[1].to_ptr end end + # + describe Efl::Elm::ElmPanel do + # + before(:all) { + realize_app + @p = Elm::ElmPanel.new @win + @os = [] + } + after(:all) { + @p.free + @bg.free + @win.free + } + # + it "orient set/get" do + @p.orient_set :elm_panel_orient_bottom + @p.orient_get.should == :elm_panel_orient_bottom + @p.orient= :elm_panel_orient_top + @p.orient.should == :elm_panel_orient_top + end + # + it "content set/get/unset" do + o = @win.evas.object_rectangle_add + @p.content_set o + @p.content_get.should == o.to_ptr + @p.content_unset.should == o.to_ptr + o.free + o = @win.evas.object_rectangle_add + @p.content= o + @p.content.should == o.to_ptr + @p.content_unset.should == o.to_ptr + o.free + end + # + it "hidden set/get toggle" do + @p.hidden_set true + @p.hidden_get.should be_true + @p.hidden=false + @p.hidden.should be_false + @p.toggle + @p.hidden_get.should be_true + @p.hidden.should be_true + @p.toggle + @p.hidden_get.should be_false + @p.hidden.should be_false + end + end end |