diff options
author | Renato Filho <renato.filho@openbossa.org> | 2011-07-11 14:04:42 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:54:34 -0300 |
commit | c7385c45c4a7437fcd343bfb736b39c201bfdd6c (patch) | |
tree | 40d774f810a3c55ea6ed94127abd68d910a28291 /tests | |
parent | b731b70fb22df04029cd2b86497125b0cacb60f1 (diff) |
Created unit test for bug #886.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org>
Hugo Parente <hugo.lima@openbossa.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/pysidetest/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/pysidetest/testobject.h | 4 | ||||
-rw-r--r-- | tests/pysidetest/typesystem_pysidetest.xml | 2 |
3 files changed, 7 insertions, 0 deletions
diff --git a/tests/pysidetest/CMakeLists.txt b/tests/pysidetest/CMakeLists.txt index aa2411223..940f8c49c 100644 --- a/tests/pysidetest/CMakeLists.txt +++ b/tests/pysidetest/CMakeLists.txt @@ -75,6 +75,7 @@ add_dependencies(testbinding pyside QtCore QtGui libpyside pysidetest) PYSIDE_TEST(application_test.py) PYSIDE_TEST(decoratedslot_test.py) PYSIDE_TEST(delegatecreateseditor_test.py) +PYSIDE_TEST(enum_test.py) PYSIDE_TEST(homonymoussignalandmethod_test.py) PYSIDE_TEST(list_signal_test.py) PYSIDE_TEST(modelview_test.py) diff --git a/tests/pysidetest/testobject.h b/tests/pysidetest/testobject.h index bfb7edd8b..e2c0fc114 100644 --- a/tests/pysidetest/testobject.h +++ b/tests/pysidetest/testobject.h @@ -68,12 +68,16 @@ signals: namespace PySideCPP2 { +enum Enum1 { Option1 = 1, Option2 = 2 }; + + typedef long PySideLong; class PYSIDE_API TestObjectWithoutNamespace : public QObject { Q_OBJECT public: + enum Enum2 { Option3 = 3, Option4 = 4}; TestObjectWithoutNamespace(QObject* parent) : QObject(parent) {} QString name() { return "TestObjectWithoutNamespace"; } diff --git a/tests/pysidetest/typesystem_pysidetest.xml b/tests/pysidetest/typesystem_pysidetest.xml index 9cdd99e78..c63d5e192 100644 --- a/tests/pysidetest/typesystem_pysidetest.xml +++ b/tests/pysidetest/typesystem_pysidetest.xml @@ -20,7 +20,9 @@ </namespace-type> <namespace-type name="PySideCPP2" generate="no"> + <enum-type name="Enum1" /> <object-type name="TestObjectWithoutNamespace" > + <enum-type name="Enum2" /> <modify-function signature="emitSignalWithNamespace(PySideCPP2::TestObjectWithoutNamespace*)"> <modify-argument index="1"> <replace-type modified-type="PySideCPP2::TestObjectWithoutNamespace*"/> |