aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorrenatofilho <renato.filho@openbossa.org>2010-10-18 15:28:11 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:07:21 -0300
commit3ca81abb5f99a00004546d86a725e0d8a0f5ae77 (patch)
treeb798507b946089a0b9b1bcff28bfd62fc8fe56b1 /tests
parent63fddfeb50bbd786826dd18be8851d0567cce041 (diff)
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')
-rw-r--r--tests/libother/otherderived.h2
-rw-r--r--tests/libsample/abstract.h7
-rw-r--r--tests/libsample/derived.cpp1
-rw-r--r--tests/libsample/derived.h2
-rw-r--r--tests/samplebinding/typesystem_sample.xml4
5 files changed, 16 insertions, 0 deletions
diff --git a/tests/libother/otherderived.h b/tests/libother/otherderived.h
index 16f215451..553b14c1a 100644
--- a/tests/libother/otherderived.h
+++ b/tests/libother/otherderived.h
@@ -49,6 +49,8 @@ public:
// factory method
static Abstract* createObject();
+ void hideFunction(HideType*) {} ;
+
protected:
inline const char* getClassName() { return className(); }
virtual const char* className() { return "OtherDerived"; }
diff --git a/tests/libsample/abstract.h b/tests/libsample/abstract.h
index bbe39efa0..8b68b6ea6 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 98f4395ca..408e2425d 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 07c11caff..73f132d06 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"; }
diff --git a/tests/samplebinding/typesystem_sample.xml b/tests/samplebinding/typesystem_sample.xml
index 2960ec734..0e9b16ca2 100644
--- a/tests/samplebinding/typesystem_sample.xml
+++ b/tests/samplebinding/typesystem_sample.xml
@@ -125,6 +125,7 @@
<enum-type name="Type"/>
<enum-type name="PrintFormat"/>
<modify-function signature="id()" rename="id_"/>
+ <modify-function signature="hideFunction(HideType*)" remove="all"/>
</object-type>
<object-type name="Derived" polymorphic-id-expression="%1->type() == Derived::TpDerived">
@@ -1232,6 +1233,9 @@
<object-type name="HandleHolder" />
+ <!-- type used in abstract method -->
+ <object-type name="HideType" generate="no" />
+
<rejection class="ListUser" function-name="createList()"/>
<rejection class="ListUser" function-name="callCreateList()"/>
<rejection class="ListUser" function-name="createComplexList(Complex, Complex)"/>