From e2a0e0faae52e96c8f19d5bb79b2db5dd02a6ccd Mon Sep 17 00:00:00 2001 From: ttate Date: Mon, 9 May 2005 14:43:50 +0000 Subject: added a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/dl/test/test_import.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ext/dl/test') diff --git a/ext/dl/test/test_import.rb b/ext/dl/test/test_import.rb index c96c330a8c..5b5c9b07ff 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)) -- cgit v1.2.3