diff options
author | Hugo Lima <hugo.lima@openbossa.org> | 2009-08-31 19:39:09 -0300 |
---|---|---|
committer | Hugo Lima <hugo.lima@openbossa.org> | 2009-08-31 19:42:53 -0300 |
commit | 1eef8c3c7c905675ddeb09e7ada3e98e8b6fa4b5 (patch) | |
tree | 48fe5608bd68d25ec003aaa1d03ddf8be9c4c05e /tests | |
parent | e853413dc073d187ccc0a5d5c252332b4f5e37c1 (diff) |
Added a corner case to broke Shiboken tests >:-)
Shiboken generates wrong C++ code when exists a function/method that returns
a type without a default constructor.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/libsample/nondefaultctor.h | 28 | ||||
-rw-r--r-- | tests/samplebinding/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/samplebinding/global.h | 2 | ||||
-rw-r--r-- | tests/samplebinding/typesystem_sample.xml | 1 |
4 files changed, 31 insertions, 1 deletions
diff --git a/tests/libsample/nondefaultctor.h b/tests/libsample/nondefaultctor.h new file mode 100644 index 000000000..b3ead28c5 --- /dev/null +++ b/tests/libsample/nondefaultctor.h @@ -0,0 +1,28 @@ + +#ifndef NONDEFAULTCTOR_H +#define NONDEFAULTCTOR_H + +class NonDefaultCtor +{ +public: + NonDefaultCtor(int) + { + } + + NonDefaultCtor returnMyself() + { + return *this; + } + + NonDefaultCtor returnMyself(int) + { + return *this; + } + + NonDefaultCtor returnMyself(int, NonDefaultCtor) + { + return *this; + } +}; + +#endif diff --git a/tests/samplebinding/CMakeLists.txt b/tests/samplebinding/CMakeLists.txt index 67ca34313..cc509d772 100644 --- a/tests/samplebinding/CMakeLists.txt +++ b/tests/samplebinding/CMakeLists.txt @@ -12,6 +12,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/sample/implicitconv_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/sample/listuser_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/sample/modifications_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/sample/mapuser_wrapper.cpp +${CMAKE_CURRENT_BINARY_DIR}/sample/nondefaultctor_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/sample/pairuser_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/sample/point_wrapper.cpp ${CMAKE_CURRENT_BINARY_DIR}/sample/reference_wrapper.cpp diff --git a/tests/samplebinding/global.h b/tests/samplebinding/global.h index 98fdd2144..893917654 100644 --- a/tests/samplebinding/global.h +++ b/tests/samplebinding/global.h @@ -13,4 +13,4 @@ #include "implicitconv.h" #include "reference.h" #include "virtualmethods.h" - +#include "nondefaultctor.h" diff --git a/tests/samplebinding/typesystem_sample.xml b/tests/samplebinding/typesystem_sample.xml index 071b2ea42..168befbee 100644 --- a/tests/samplebinding/typesystem_sample.xml +++ b/tests/samplebinding/typesystem_sample.xml @@ -208,6 +208,7 @@ <value-type name="MapUser"/> <value-type name="PairUser"/> <value-type name="ListUser"/> + <value-type name="NonDefaultCtor" /> <rejection class="ListUser" function-name="createList()"/> <rejection class="ListUser" function-name="callCreateList()"/> |