Test/fixes to handle NULL pointer for unique_ptr/auto_ptr
Also add missing unique_ptr tests for Lua and Racket.
This commit is contained in:
parent
ca9eebcb8d
commit
7934561874
32 changed files with 434 additions and 6 deletions
|
|
@ -74,6 +74,12 @@
|
|||
(set! kini '()) (gc) ; Should not fail, even though already deleted
|
||||
(checkCount 0)
|
||||
|
||||
(define null '())
|
||||
(takeKlassAutoPtr null)
|
||||
(takeKlassAutoPtr (make-null))
|
||||
(checkCount 0)
|
||||
|
||||
|
||||
; auto_ptr as output
|
||||
(define k1 (makeKlassAutoPtr "first"))
|
||||
(define k2 (makeKlassAutoPtr "second"))
|
||||
|
|
@ -88,4 +94,7 @@
|
|||
(set! k2 '()) (gc)
|
||||
(checkCount 0)
|
||||
|
||||
(unless (null? (makeNullAutoPtr))
|
||||
(error "null failure"))
|
||||
|
||||
(exit 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue