Add missing typecheck typemaps for std::auto_ptr and std::unique_ptr

To fix overloading when using these types.
This commit is contained in:
William S Fulton 2022-09-17 10:23:51 +01:00
commit e97181ebc0
59 changed files with 442 additions and 2 deletions

View file

@ -1,6 +1,6 @@
use strict;
use warnings;
use Test::More tests => 30;
use Test::More tests => 34;
BEGIN { use_ok('li_std_auto_ptr') }
require_ok('li_std_auto_ptr');
@ -77,6 +77,12 @@ li_std_auto_ptr::takeKlassAutoPtr(undef);
li_std_auto_ptr::takeKlassAutoPtr(li_std_auto_ptr::make_null());
checkCount(0);
# overloaded parameters
is(li_std_auto_ptr::overloadTest(), 0, "overloadTest failed");
is(li_std_auto_ptr::overloadTest(undef), 1, "overloadTest failed");
is(li_std_auto_ptr::overloadTest(new li_std_auto_ptr::Klass("over")), 1, "overloadTest failed");
checkCount(0);
# auto_ptr as output
my $k1 = li_std_auto_ptr::makeKlassAutoPtr("first");