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 | 2daa629e268a51d7d668c3c12c3f04777fc81228 (patch) | |
| tree | 165dde56bed8257b9f3028135dc50b438f8d5060 /ext/dl/test | |
| parent | b9b2c6c2e88ddffc85d6629cebf446b9a2f3ec82 (diff) | |
| download | ruby-2daa629e268a51d7d668c3c12c3f04777fc81228.tar.gz ruby-2daa629e268a51d7d668c3c12c3f04777fc81228.tar.xz ruby-2daa629e268a51d7d668c3c12c3f04777fc81228.zip | |
added DL::Importer.sizeof().
git-svn-id: http://svn.ruby-lang.org/repos/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 ced2ac8dd..14fb1eba6 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 |
