* ext/fiddle/lib/fiddle/import.rb (Fiddle::Importer#sizeof):

CPtr -> Pointer.
* test/fiddle/test_import.rb (Fiddle::TestImport#test_sizeof):
  Added the test for the above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kou 2012-12-21 13:44:44 +00:00
parent 914611adbc
commit 3fed8bc9a5
3 changed files with 9 additions and 1 deletions

View file

@ -59,6 +59,7 @@ module Fiddle
def test_sizeof()
assert_equal(SIZEOF_VOIDP, LIBC.sizeof("FILE*"))
assert_equal(LIBC::MyStruct.size(), LIBC.sizeof(LIBC::MyStruct))
assert_equal(LIBC::MyStruct.size(), LIBC.sizeof(LIBC::MyStruct.malloc()))
end
def test_unsigned_result()