summaryrefslogtreecommitdiff
path: root/test/dl
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-01 01:46:56 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-01 01:46:56 +0000
commit4b76900a55b4159888dd2edc6a8828e2964318d2 (patch)
tree350a8efd632ae88772e17eae8e533af36f6db9db /test/dl
parent6cf6d8556c1df4962ae5775538690e4957e2ac1a (diff)
* ext/dl/cptr.c (rb_dlptr_to_value) added documentation
* test/dl/test_cptr.rb (test_to_value) testing DL::CPtr#to_value git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/dl')
-rw-r--r--test/dl/test_cptr.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/dl/test_cptr.rb b/test/dl/test_cptr.rb
index 4157f83361..461b7d27d4 100644
--- a/test/dl/test_cptr.rb
+++ b/test/dl/test_cptr.rb
@@ -3,6 +3,12 @@ require_relative '../ruby/envutil'
module DL
class TestCPtr < TestBase
+ def test_to_value
+ ary = [0,1,2,4,5]
+ addr = CPtr.new(dlwrap(ary))
+ assert_equal ary, addr.to_value
+ end
+
def test_free
ptr = CPtr.malloc(4)
assert_nil ptr.free