aboutsummaryrefslogtreecommitdiff
path: root/tests/GenerateSipBindings/testscript.py
diff options
context:
space:
mode:
authorShaheed Haque <srhaque@theiet.org>2017-02-04 11:00:16 +0000
committerStephen Kelly <steveire@gmail.com>2017-02-04 11:27:15 +0000
commit050f15ef6a0c44dc6a7abbbe0f1954ea1925f473 (patch)
tree2e28042d4fd929d863a7c1e48d0a32d54ff9eb55 /tests/GenerateSipBindings/testscript.py
parent4e17330a4520b1994a6488993a2a887f1f051d72 (diff)
downloadextra-cmake-modules-050f15ef6a0c44dc6a7abbbe0f1954ea1925f473.tar.gz
extra-cmake-modules-050f15ef6a0c44dc6a7abbbe0f1954ea1925f473.tar.bz2
Bindings: Take account of visibility attribute on APIs
Don't export API which has visibility "hidden". Visibility attributes on variables are ignored, but call the generic method anyway. Remove checks for macros which obscure the attributes. Processing the attribute directly means that is not needed.
Diffstat (limited to 'tests/GenerateSipBindings/testscript.py')
-rw-r--r--tests/GenerateSipBindings/testscript.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/GenerateSipBindings/testscript.py b/tests/GenerateSipBindings/testscript.py
index e79706bc..98443d53 100644
--- a/tests/GenerateSipBindings/testscript.py
+++ b/tests/GenerateSipBindings/testscript.py
@@ -121,3 +121,12 @@ assert(PyTest.CppLib.anotherCustomMethod([2, 3, 5]) == 52)
sdo = PyTest.CppLib.SubdirObject()
assert(sdo.mul(5, 6) == 30)
+
+visible = PyTest.CppLib.Visible()
+assert visible.visible_fn()
+
+try:
+ assert visible.invisible_fn()
+ assert False
+except AttributeError as e:
+ assert str(e) == "'Visible' object has no attribute 'invisible_fn'"