summaryrefslogtreecommitdiffstats
path: root/tests/libsample
diff options
context:
space:
mode:
authorrenatofilho <renato.filho@openbossa.org>2010-10-18 15:28:11 -0300
committerrenatofilho <renato.filho@openbossa.org>2010-10-18 17:16:07 -0300
commitc464a4d10b59396115acbd0340fb15f00d71290b (patch)
tree2a60cb152ea88ad07aeff8238a75a9fcf5dafc46 /tests/libsample
parent6b57558fefd3a1e3913e8fe386a07da0d8aeedc3 (diff)
downloadshiboken-c464a4d10b59396115acbd0340fb15f00d71290b.tar.gz
shiboken-c464a4d10b59396115acbd0340fb15f00d71290b.tar.xz
shiboken-c464a4d10b59396115acbd0340fb15f00d71290b.zip
Created test for abstract function with not exported type as agument.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com> Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'tests/libsample')
-rw-r--r--tests/libsample/abstract.h7
-rw-r--r--tests/libsample/derived.cpp1
-rw-r--r--tests/libsample/derived.h2
3 files changed, 10 insertions, 0 deletions
diff --git a/tests/libsample/abstract.h b/tests/libsample/abstract.h
index bbe39efa..8b68b6ea 100644
--- a/tests/libsample/abstract.h
+++ b/tests/libsample/abstract.h
@@ -28,6 +28,11 @@
class ObjectType;
+// this class is not exported to python
+class HideType
+{
+};
+
class LIBSAMPLE_API Abstract
{
private:
@@ -80,6 +85,8 @@ public:
void show(PrintFormat format = Verbose);
virtual Type type() const { return TpAbstract; }
+ virtual void hideFunction(HideType* arg) = 0;
+
protected:
virtual const char* className() { return "Abstract"; }
diff --git a/tests/libsample/derived.cpp b/tests/libsample/derived.cpp
index 98f4395c..408e2425 100644
--- a/tests/libsample/derived.cpp
+++ b/tests/libsample/derived.cpp
@@ -96,6 +96,7 @@ struct SecretClass : public Abstract {
virtual void pureVirtual() {}
virtual void* pureVirtualReturningVoidPtr() { return 0; }
virtual PrintFormat returnAnEnum() { return Short; }
+ void hideFunction(HideType*){};
};
Abstract* Derived::triggerImpossibleTypeDiscovery()
diff --git a/tests/libsample/derived.h b/tests/libsample/derived.h
index 07c11caf..73f132d0 100644
--- a/tests/libsample/derived.h
+++ b/tests/libsample/derived.h
@@ -76,6 +76,8 @@ public:
static Abstract* triggerImpossibleTypeDiscovery();
static Abstract* triggerAnotherImpossibleTypeDiscovery();
+
+ void hideFunction(HideType*) {}
protected:
const char* getClassName() { return className(); }
virtual const char* className() { return "Derived"; }