aboutsummaryrefslogtreecommitdiffstats
path: root/test/dl/test_import.rb
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-28 00:02:49 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-28 00:02:49 +0000
commit0713f89944ecfff3aeefda1edcf44c0ea3e98de0 (patch)
treea518520570eb0475cdc347b30e7ad716147cdbf2 /test/dl/test_import.rb
parent118d9f43c8f2e1665fb6ebac751299a852072133 (diff)
downloadruby-0713f89944ecfff3aeefda1edcf44c0ea3e98de0.tar.gz
* ext/fiddle/fiddle.c: adding alignment constants for compatibility
with DL. * ext/fiddle/fiddle.h: ditto * ext/fiddle/lib/fiddle/cparser.rb: importing the C parser for DL backwards compatibility. * ext/fiddle/lib/fiddle/import.rb: importing the import DSL for DL backwards compatibility. * ext/fiddle/lib/fiddle/pack.rb: importing structure pack for DL backwards compatibility. * ext/fiddle/lib/fiddle/value.rb: ditto * ext/fiddle/lib/fiddle/struct.rb: importing struct DSL for DL backwards compatibility. * test/dl/test_c_struct_entry.rb: importing tests * test/dl/test_c_union_entity.rb: ditto * test/dl/test_cparser.rb: ditto * test/dl/test_import.rb: ditto * test/fiddle/test_c_struct_entry.rb: ditto * test/fiddle/test_c_union_entity.rb: ditto * test/fiddle/test_cparser.rb: ditto * test/fiddle/test_import.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/dl/test_import.rb')
-rw-r--r--test/dl/test_import.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/dl/test_import.rb b/test/dl/test_import.rb
index 41def7c913..8b3f39b851 100644
--- a/test/dl/test_import.rb
+++ b/test/dl/test_import.rb
@@ -35,7 +35,7 @@ module DL
]
CallCallback = bind("void call_callback(void*, void*)"){|ptr1, ptr2|
- f = Function.new(CFunc.new(ptr1.to_i, DL::TYPE_VOID, "<anonymous>"), [TYPE_VOIDP])
+ f = Function.new(CFunc.new(ptr1.to_i, TYPE_VOID, "<anonymous>"), [TYPE_VOIDP])
f.call(ptr2)
}
CarriedFunction = bind("void callback_function(void*)", :carried, 0)
@@ -45,7 +45,7 @@ module DL
def test_ensure_call_dlload
err = assert_raises(RuntimeError) do
Class.new do
- extend DL::Importer
+ extend Importer
extern "void *strcpy(char*, char*)"
end
end
@@ -59,7 +59,7 @@ module DL
end
def test_sizeof()
- assert_equal(DL::SIZEOF_VOIDP, LIBC.sizeof("FILE*"))
+ assert_equal(SIZEOF_VOIDP, LIBC.sizeof("FILE*"))
assert_equal(LIBC::MyStruct.size(), LIBC.sizeof(LIBC::MyStruct))
end
@@ -71,7 +71,7 @@ module DL
end
def test_io()
- if( RUBY_PLATFORM != DL::BUILD_RUBY_PLATFORM )
+ if( RUBY_PLATFORM != BUILD_RUBY_PLATFORM )
return
end
io_in,io_out = IO.pipe()