summaryrefslogtreecommitdiff
path: root/Examples/test-suite/mzscheme
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2022-09-17 10:23:51 +0100
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2022-09-17 10:23:51 +0100
commite97181ebc07a4755c1ab3e6f08eef12a3f9de07e (patch)
tree16dc71ce60c3a97a93976af5fdd5e86482aaa8c1 /Examples/test-suite/mzscheme
parentf0af17b3244d98109a62e3fda5ab6e5fc458283d (diff)
downloadswig-e97181ebc07a4755c1ab3e6f08eef12a3f9de07e.tar.gz
Add missing typecheck typemaps for std::auto_ptr and std::unique_ptr
To fix overloading when using these types.
Diffstat (limited to 'Examples/test-suite/mzscheme')
-rw-r--r--Examples/test-suite/mzscheme/cpp11_std_unique_ptr_runme.scm9
-rw-r--r--Examples/test-suite/mzscheme/li_std_auto_ptr_runme.scm9
2 files changed, 18 insertions, 0 deletions
diff --git a/Examples/test-suite/mzscheme/cpp11_std_unique_ptr_runme.scm b/Examples/test-suite/mzscheme/cpp11_std_unique_ptr_runme.scm
index 5996586af..cd0e18038 100644
--- a/Examples/test-suite/mzscheme/cpp11_std_unique_ptr_runme.scm
+++ b/Examples/test-suite/mzscheme/cpp11_std_unique_ptr_runme.scm
@@ -79,6 +79,15 @@
(takeKlassUniquePtr (make-null))
(checkCount 0)
+; overloaded parameters
+(unless (= (overloadTest) 0)
+ (error "overloadTest failed"))
+(unless (= (overloadTest null) 1)
+ (error "overloadTest failed"))
+(unless (= (overloadTest (new-Klass "over")) 1)
+ (error "overloadTest failed"))
+(checkCount 0)
+
; unique_ptr as output
(define k1 (makeKlassUniquePtr "first"))
diff --git a/Examples/test-suite/mzscheme/li_std_auto_ptr_runme.scm b/Examples/test-suite/mzscheme/li_std_auto_ptr_runme.scm
index f52829163..c6c43dba0 100644
--- a/Examples/test-suite/mzscheme/li_std_auto_ptr_runme.scm
+++ b/Examples/test-suite/mzscheme/li_std_auto_ptr_runme.scm
@@ -79,6 +79,15 @@
(takeKlassAutoPtr (make-null))
(checkCount 0)
+; overloaded parameters
+(unless (= (overloadTest) 0)
+ (error "overloadTest failed"))
+(unless (= (overloadTest null) 1)
+ (error "overloadTest failed"))
+(unless (= (overloadTest (new-Klass "over")) 1)
+ (error "overloadTest failed"))
+(checkCount 0)
+
; auto_ptr as output
(define k1 (makeKlassAutoPtr "first"))