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:
parent
74d8325cdf
commit
55268bbc2d
2 changed files with 20 additions and 0 deletions
|
|
@ -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.
|
||||
|
|
|
|||
19
Examples/test-suite/cpp0x_smart_pointers.i
Normal file
19
Examples/test-suite/cpp0x_smart_pointers.i
Normal 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);
|
||||
};
|
||||
%}
|
||||
Loading…
Add table
Add a link
Reference in a new issue