diff options
author | Shaheed Haque <srhaque@theiet.org> | 2017-01-05 20:27:44 +0000 |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2017-01-05 20:30:21 +0000 |
commit | 13f66631495e232ae53a0bb683bce323f1a7acb2 (patch) | |
tree | 5933d72bd4dd17102abda18cd8e20c128f66457c /tests | |
parent | 738972a9a29a429592fe7e375ff7c550d7c596d5 (diff) | |
download | extra-cmake-modules-13f66631495e232ae53a0bb683bce323f1a7acb2.tar.gz extra-cmake-modules-13f66631495e232ae53a0bb683bce323f1a7acb2.tar.bz2 |
Skip attributes on enums when generating bindings
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) |