diff options
Diffstat (limited to 'test/dl')
-rw-r--r-- | test/dl/test_cptr.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/dl/test_cptr.rb b/test/dl/test_cptr.rb index 953af286e1..c3793859d7 100644 --- a/test/dl/test_cptr.rb +++ b/test/dl/test_cptr.rb @@ -212,5 +212,11 @@ module DL assert_equal ptr3.to_i, ptr[0,2] = ptr3.to_i check.call(str, ptr) end + + def test_null_pointer + nullpo = CPtr.new(0) + assert_raise(DLError) {nullpo[0]} + assert_raise(DLError) {nullpo[0] = 1} + end end end |