diff options
author | ttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-02-06 06:54:12 +0000 |
---|---|---|
committer | ttate <ttate@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-02-06 06:54:12 +0000 |
commit | 93711e5bd35203e6622f89fe72b38b13478b9313 (patch) | |
tree | 165dde56bed8257b9f3028135dc50b438f8d5060 /ext/dl/test | |
parent | b393a2bc5fe07abef59656a6358f7ee7113bbe8b (diff) | |
download | ruby-93711e5bd35203e6622f89fe72b38b13478b9313.tar.gz |
added DL::Importer.sizeof().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dl/test')
-rw-r--r-- | ext/dl/test/test_import.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/dl/test/test_import.rb b/ext/dl/test/test_import.rb index ced2ac8dd7..14fb1eba65 100644 --- a/ext/dl/test/test_import.rb +++ b/ext/dl/test/test_import.rb @@ -40,6 +40,11 @@ module DL end class TestImport < TestBase + def test_sizeof() + assert_equal(DL::SIZEOF_VOIDP, LIBC.sizeof("FILE*")) + assert_equal(LIBC::MyStruct.size(), LIBC.sizeof(LIBC::MyStruct)) + end + def test_unsigned_result() d = (2 ** 31) + 1 |