From 545dfac5d42d1b6951a5db2395bde5247741f568 Mon Sep 17 00:00:00 2001 From: tenderlove Date: Sun, 1 Nov 2009 01:46:56 +0000 Subject: * 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: http://svn.ruby-lang.org/repos/ruby/trunk@25607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/dl/test_cptr.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test') diff --git a/test/dl/test_cptr.rb b/test/dl/test_cptr.rb index 4157f8336..461b7d27d 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 -- cgit