summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/eina_list_spec.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/spec/eina_list_spec.rb b/spec/eina_list_spec.rb
index 0cf2501..a51b148 100644
--- a/spec/eina_list_spec.rb
+++ b/spec/eina_list_spec.rb
@@ -79,7 +79,7 @@ describe Efl::EinaList do
l.free
end
#
- it "should be able to build from ruby Array" do
+ it "should be able to build from a ruby Array of pointers" do
a = []
a << ::FFI::MemoryPointer.from_string("D0")
a << ::FFI::MemoryPointer.from_string("D1")
@@ -92,6 +92,15 @@ describe Efl::EinaList do
l.free
end
#
+ it "should be able to build from a ruby Array of int" do
+ a = [3,4,5,6]
+ l = REinaList.from_a a, :int
+ 0.upto 3 do |i|
+ l.nth(i).read_int.should == i+3
+ end
+ l.free
+ end
+ #
it "Enumerable" do
l = REinaList.new
d1 = ::FFI::MemoryPointer.from_string "D0"