Add test of null shared pointers emitted from C++

This tests nulls emitted as pointers and values of shared pointers,
created from null, from references, and from default constructors.
This commit is contained in:
Seth R Johnson 2022-02-12 19:39:35 -05:00
commit b08713f09f
2 changed files with 17 additions and 0 deletions

View file

@ -242,6 +242,10 @@ std::string nullsmartpointerpointertest(SwigBoost::shared_ptr<Klass>* k) {
else
return "also not null";
}
SwigBoost::shared_ptr<Klass>* sp_pointer_null() { return NULL; }
SwigBoost::shared_ptr<Klass>* null_sp_pointer() { static SwigBoost::shared_ptr<Klass> static_sp; return &static_sp; }
SwigBoost::shared_ptr<Klass> sp_value_null() { return SwigBoost::shared_ptr<Klass>(); }
// $owner
Klass *pointerownertest() {
return new Klass("pointerownertest");