Added testcase for shared_ptr, unique_ptr and weak_ptr.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@11394 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Matevz Jekovec 2009-07-14 12:26:26 +00:00
commit 55268bbc2d
2 changed files with 20 additions and 0 deletions

View file

@ -406,6 +406,7 @@ CPP0X_TEST_CASES = \
cpp0x_static_assert \
cpp0x_template_explicit \
cpp0x_thread_local
# cpp0x_smart_pointers # not supported by standard library yet
# cpp0x_constexpr # not supported by any compilers yet
# Broken C++0x test cases.

View file

@ -0,0 +1,19 @@
/* This testcase checks whether Swig correctly uses the new general-purpose
smart pointers introduced in C++0x:
- shared_ptr
- weak_ptr
- unique_ptr
*/
%module cpp0x_smart_pointers
%inline %{
#include <tr1/shared_ptr.h>
#include <tr1/unique_ptr.h>
#include <tr1/weak_ptr.h>
struct A {
std::shared_ptr<double> a1(new double);
std::unique_ptr<double> a2(new double);
std::weak_ptr<double> a3(a1);
};
%}