Fixed cpp0x_result_of testcase.
Added testcase cpp0x_sizeof_object. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@11538 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
955c736164
commit
bc8f86b6ec
3 changed files with 20 additions and 1 deletions
|
|
@ -414,7 +414,8 @@ CPP0X_TEST_CASES = \
|
|||
cpp0x_userdefined_literals \
|
||||
cpp0x_decltype \
|
||||
cpp0x_result_of \
|
||||
cpp0x_default_delete
|
||||
cpp0x_default_delete \
|
||||
cpp0x_sizeof_object
|
||||
# cpp0x_template_typedefs # not supported by any compiler yet
|
||||
# cpp0x_hash_types # not fully implemented yet
|
||||
# cpp0x_constructors # not supported by any compiler yet
|
||||
|
|
|
|||
|
|
@ -17,3 +17,4 @@ typename std::result_of<Fun(Arg)>::type test_result_impl(Fun fun, Arg arg) {
|
|||
%}
|
||||
|
||||
%template(test_result) test_result_impl<double(*)(double), double>;
|
||||
%constant double (*SQUARE)(double) = square;
|
||||
|
|
|
|||
17
Examples/test-suite/cpp0x_sizeof_object.i
Normal file
17
Examples/test-suite/cpp0x_sizeof_object.i
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
/* This testcase checks whether Swig correctly uses the sizeof() on the
|
||||
concrete objects and not only types introduced in C++0x. */
|
||||
%module cpp0x_sizeof_object
|
||||
|
||||
%inline %{
|
||||
struct B {
|
||||
unsigned long member1;
|
||||
long long member2;
|
||||
char member3;
|
||||
};
|
||||
|
||||
struct A {
|
||||
B member;
|
||||
};
|
||||
|
||||
const int a = sizeof(A::member);
|
||||
%}
|
||||
Loading…
Add table
Add a link
Reference in a new issue