mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
added a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
597a64146f
commit
e2a0e0faae
1 changed files with 6 additions and 0 deletions
|
@ -40,6 +40,12 @@ module DL
|
|||
end
|
||||
|
||||
class TestImport < TestBase
|
||||
def test_malloc()
|
||||
s1 = LIBC::Timeval.malloc()
|
||||
s2 = LIBC::Timeval.malloc()
|
||||
assert_not_equal(s1.to_ptr.to_i, s2.to_ptr.to_i)
|
||||
end
|
||||
|
||||
def test_sizeof()
|
||||
assert_equal(DL::SIZEOF_VOIDP, LIBC.sizeof("FILE*"))
|
||||
assert_equal(LIBC::MyStruct.size(), LIBC.sizeof(LIBC::MyStruct))
|
||||
|
|
Loading…
Reference in a new issue