From 98d065773413aba437c0bc537c701ed39d38a9b9 Mon Sep 17 00:00:00 2001 From: Shaheed Haque Date: Sat, 4 Feb 2017 11:16:19 +0000 Subject: Bindings: Take account of visibility of classes --- tests/GenerateSipBindings/cpplib.h | 6 ++++++ tests/GenerateSipBindings/testscript.py | 5 +++++ 2 files changed, 11 insertions(+) (limited to 'tests') diff --git a/tests/GenerateSipBindings/cpplib.h b/tests/GenerateSipBindings/cpplib.h index b3ea22a8..958b8750 100644 --- a/tests/GenerateSipBindings/cpplib.h +++ b/tests/GenerateSipBindings/cpplib.h @@ -213,3 +213,9 @@ public: EXPORT int visible_fn() { return 1; } NO_EXPORT int invisible_fn() { return 1; } }; + +class NO_EXPORT Invisible +{ +public: + int someApi() { return 1; } +}; diff --git a/tests/GenerateSipBindings/testscript.py b/tests/GenerateSipBindings/testscript.py index 98443d53..b388841f 100644 --- a/tests/GenerateSipBindings/testscript.py +++ b/tests/GenerateSipBindings/testscript.py @@ -130,3 +130,8 @@ try: assert False except AttributeError as e: assert str(e) == "'Visible' object has no attribute 'invisible_fn'" +try: + invisible = PyTest.CppLib.Invisible() + assert False +except AttributeError as e: + assert str(e) == "module 'PyTest.CppLib' has no attribute 'Invisible'" -- cgit v1.2.1