From 3ca81abb5f99a00004546d86a725e0d8a0f5ae77 Mon Sep 17 00:00:00 2001 From: renatofilho Date: Mon, 18 Oct 2010 15:28:11 -0300 Subject: Created test for abstract function with not exported type as agument. Reviewer: Hugo Parente Lima Luciano Wolf --- tests/libsample/abstract.h | 7 +++++++ tests/libsample/derived.cpp | 1 + tests/libsample/derived.h | 2 ++ 3 files changed, 10 insertions(+) (limited to 'tests/libsample') 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"; } -- cgit v1.2.3