aboutsummaryrefslogtreecommitdiffstats
path: root/ext/dl/test/test_import.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dl/test/test_import.rb')
-rw-r--r--ext/dl/test/test_import.rb5
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