diff options
author | ttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-05-09 14:43:50 +0000 |
---|---|---|
committer | ttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-05-09 14:43:50 +0000 |
commit | 82a95d070ce9b5b517ab51f2fb203d70431fcb3a (patch) | |
tree | 30bb1498b76a85666f4e5bbf9a7f40fb59a49fa4 /ext/dl | |
parent | f83caee830812d8f597e7e4d97645104145c03eb (diff) | |
download | ruby-82a95d070ce9b5b517ab51f2fb203d70431fcb3a.tar.gz ruby-82a95d070ce9b5b517ab51f2fb203d70431fcb3a.tar.xz ruby-82a95d070ce9b5b517ab51f2fb203d70431fcb3a.zip |
added a test.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dl')
-rw-r--r-- | ext/dl/test/test_import.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/dl/test/test_import.rb b/ext/dl/test/test_import.rb index c96c330a8..5b5c9b07f 100644 --- a/ext/dl/test/test_import.rb +++ b/ext/dl/test/test_import.rb @@ -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)) |