summaryrefslogtreecommitdiffstats
path: root/tests/libsample/virtualmethods.h
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2009-11-24 13:19:53 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2009-11-24 15:35:46 -0300
commit2c32ffea81cd5acc6502cd9864d5dc4d5f63c64f (patch)
tree007ee0b5a67337ed8a916987c1d30cb9b5d98c9f /tests/libsample/virtualmethods.h
parent81282d09cd9b03bade993957a9fc2791eda3393e (diff)
downloadshiboken-2c32ffea81cd5acc6502cd9864d5dc4d5f63c64f.tar.gz
shiboken-2c32ffea81cd5acc6502cd9864d5dc4d5f63c64f.tar.xz
shiboken-2c32ffea81cd5acc6502cd9864d5dc4d5f63c64f.zip
Added tests for classes with virtual and non-virtual protected methods,
for virtual protected destructors, and for non-virtual protected methods modified with signature removal, add-function and code injection. Also improved the tests for non-protected virtual destructors.
Diffstat (limited to 'tests/libsample/virtualmethods.h')
-rw-r--r--tests/libsample/virtualmethods.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/libsample/virtualmethods.h b/tests/libsample/virtualmethods.h
index cd504d90..be7f54ec 100644
--- a/tests/libsample/virtualmethods.h
+++ b/tests/libsample/virtualmethods.h
@@ -90,9 +90,11 @@ class VirtualDtor
{
public:
VirtualDtor() {}
- virtual ~VirtualDtor() { VirtualDtor::dtor_called++; }
+ virtual ~VirtualDtor() { dtor_called++; }
+ static VirtualDtor* create() { return new VirtualDtor(); }
static int dtorCalled() { return dtor_called; }
+ static void resetDtorCounter() { dtor_called = 0; }
private:
static int dtor_called;