summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2011-04-27 06:27:47 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2011-04-27 06:27:47 +0200
commit94434474b1c0edd25e0e2423635c6bc12e574e18 (patch)
tree260fa051878a1d015500edd0988f9bb41ce08710 /spec
parentdbab4c802acbcd62262efd44f5415285a39de011 (diff)
downloadffi-efl-94434474b1c0edd25e0e2423635c6bc12e574e18.zip
ffi-efl-94434474b1c0edd25e0e2423635c6bc12e574e18.tar.gz
module Efl::API renamed to Efl::FFI
Diffstat (limited to 'spec')
-rw-r--r--spec/eet_spec.rb14
-rw-r--r--spec/evas_spec.rb32
2 files changed, 23 insertions, 23 deletions
diff --git a/spec/eet_spec.rb b/spec/eet_spec.rb
index 188f976..a4c1997 100644
--- a/spec/eet_spec.rb
+++ b/spec/eet_spec.rb
@@ -28,15 +28,15 @@ describe Efl::Eet do
end
#
it "should have good enums" do
- Efl::API.enum_type(:eet_file_mode)[:eet_file_mode_invalid].should eql -1
- Efl::API.enum_type(:eet_file_mode)[:eet_file_mode_read].should eql 0
- Efl::API.enum_type(:eet_file_mode)[:eet_file_mode_write].should eql 1
- Efl::API.enum_type(:eet_file_mode)[:eet_file_mode_read_write].should eql 2
+ Efl::FFI.enum_type(:eet_file_mode)[:eet_file_mode_invalid].should eql -1
+ Efl::FFI.enum_type(:eet_file_mode)[:eet_file_mode_read].should eql 0
+ Efl::FFI.enum_type(:eet_file_mode)[:eet_file_mode_write].should eql 1
+ Efl::FFI.enum_type(:eet_file_mode)[:eet_file_mode_read_write].should eql 2
end
#
it "should open and close" do
Eet.init
- f = Eet.open FP, Efl::API.enum_type(:eet_file_mode)[:eet_file_mode_write]
+ f = Eet.open FP, Efl::FFI.enum_type(:eet_file_mode)[:eet_file_mode_write]
f.write 'fake', 'value'
f.close
Eet.shutdown
@@ -44,9 +44,9 @@ describe Efl::Eet do
#
it "should be able to get file access mode" do
Eet.init
- Efl::API.enum_type(:eet_file_mode).symbols.each do |m|
+ Efl::FFI.enum_type(:eet_file_mode).symbols.each do |m|
next if m==:eet_file_mode_invalid
- Eet.open FP, Efl::API.enum_type(:eet_file_mode)[m] do |f|
+ Eet.open FP, Efl::FFI.enum_type(:eet_file_mode)[m] do |f|
f.mode_get.should eql m
end
end
diff --git a/spec/evas_spec.rb b/spec/evas_spec.rb
index 755fb23..4350e86 100644
--- a/spec/evas_spec.rb
+++ b/spec/evas_spec.rb
@@ -20,15 +20,15 @@ describe Efl::Evas do
end
#
it "evas alloc error enum is ok" do
- Efl::API.enum_value(:evas_alloc_error_none).should eql 0
- Efl::API.enum_value(:evas_alloc_error_fatal).should eql 1
- Efl::API.enum_value(:evas_alloc_error_recovered).should eql 2
- Efl::API.enum_type(:evas_alloc_error)[0].should eql :evas_alloc_error_none
- Efl::API.enum_type(:evas_alloc_error)[1].should eql :evas_alloc_error_fatal
- Efl::API.enum_type(:evas_alloc_error)[2].should eql :evas_alloc_error_recovered
- Efl::API.enum_type(:evas_alloc_error)[:evas_alloc_error_none].should eql 0
- Efl::API.enum_type(:evas_alloc_error)[:evas_alloc_error_fatal].should eql 1
- Efl::API.enum_type(:evas_alloc_error)[:evas_alloc_error_recovered].should eql 2
+ Efl::FFI.enum_value(:evas_alloc_error_none).should eql 0
+ Efl::FFI.enum_value(:evas_alloc_error_fatal).should eql 1
+ Efl::FFI.enum_value(:evas_alloc_error_recovered).should eql 2
+ Efl::FFI.enum_type(:evas_alloc_error)[0].should eql :evas_alloc_error_none
+ Efl::FFI.enum_type(:evas_alloc_error)[1].should eql :evas_alloc_error_fatal
+ Efl::FFI.enum_type(:evas_alloc_error)[2].should eql :evas_alloc_error_recovered
+ Efl::FFI.enum_type(:evas_alloc_error)[:evas_alloc_error_none].should eql 0
+ Efl::FFI.enum_type(:evas_alloc_error)[:evas_alloc_error_fatal].should eql 1
+ Efl::FFI.enum_type(:evas_alloc_error)[:evas_alloc_error_recovered].should eql 2
end
#
it "should have no memory allocation error occured" do
@@ -62,8 +62,8 @@ describe Efl::Evas do
@e.output_method_set Evas::render_method_lookup("buffer")
@e.output_viewport_set 0, 0, @width, @height
@e.output_size_set @width, @height
- einfo = Efl::API::EvasEngineInfoBuffer.new @e.engine_info_get
- einfo[:info][:depth_type] = Efl::API::EVAS_ENGINE_BUFFER_DEPTH_ARGB32
+ einfo = Efl::FFI::EvasEngineInfoBuffer.new @e.engine_info_get
+ einfo[:info][:depth_type] = Efl::FFI::EVAS_ENGINE_BUFFER_DEPTH_ARGB32
einfo[:info][:dest_buffer] = @pixels
einfo[:info][:dest_buffer_row_bytes] = @width * FFI::type_size(:int);
einfo[:info][:use_color_key] = 0;
@@ -93,7 +93,7 @@ describe Efl::Evas do
(e1===e3).should be_true
e1.free
e1.ptr.should be_nil
- e4 = Evas::Evas.new Efl::API.evas_new
+ e4 = Evas::Evas.new Efl::FFI.evas_new
e4.ptr.address.should_not eql 0
e5 = e4.dup
e4.ptr.address.should eql e5.ptr.address
@@ -104,10 +104,10 @@ describe Efl::Evas do
end
#
it "focus should work" do
- Efl::API.evas_focus_in @e.ptr
- Efl::API.evas_focus_state_get(@e.ptr).should be_true
- Efl::API.evas_focus_out @e.ptr
- Efl::API.evas_focus_state_get(@e.ptr).should be_false
+ Efl::FFI.evas_focus_in @e.ptr
+ Efl::FFI.evas_focus_state_get(@e.ptr).should be_true
+ Efl::FFI.evas_focus_out @e.ptr
+ Efl::FFI.evas_focus_state_get(@e.ptr).should be_false
Efl::Evas.focus_in @e.ptr
Efl::Evas.focus_state_get(@e.ptr).should be_true
Efl::Evas.focus_out @e.ptr