diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/GenerateSipBindings/cpplib.h | 5 | ||||
-rw-r--r-- | tests/GenerateSipBindings/testscript.py | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/GenerateSipBindings/cpplib.h b/tests/GenerateSipBindings/cpplib.h index 0d63c30e..932b3b67 100644 --- a/tests/GenerateSipBindings/cpplib.h +++ b/tests/GenerateSipBindings/cpplib.h @@ -113,3 +113,8 @@ private: }; } + +enum __attribute__((visibility("default"))) EnumWithAttributes { + Foo, + Bar = 2 +}; diff --git a/tests/GenerateSipBindings/testscript.py b/tests/GenerateSipBindings/testscript.py index 6f2132a2..973d428c 100644 --- a/tests/GenerateSipBindings/testscript.py +++ b/tests/GenerateSipBindings/testscript.py @@ -26,6 +26,12 @@ assert(mo.const_parameters(30, mo) == 10) assert(mo.qtEnumTest(QtCore.Qt.MatchContains | QtCore.Qt.MatchStartsWith) == 3) assert(mo.localEnumTest(PyTest.CppLib.MyObject.Val2) == 2) +# +# Verify that an enum with attributes can be read. +# +assert(PyTest.CppLib.Foo == 0) +assert(PyTest.CppLib.Bar == 2) + class Reactor(QtCore.QObject): def __init__(self, obj): QtCore.QObject.__init__(self) |