summaryrefslogtreecommitdiffstats
path: root/tests/libsample/virtualmethods.h
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2009-11-24 10:47:08 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2009-11-24 15:31:08 -0300
commite00d987174d56826d9a5fb9ba9983409ad71c375 (patch)
tree6aa01eac72a61f0fd7ae83c91569c8a9969e9615 /tests/libsample/virtualmethods.h
parentffa52e72c2b8cc5d7a6086d4a5a270eac91de8b9 (diff)
downloadshiboken-e00d987174d56826d9a5fb9ba9983409ad71c375.tar.gz
shiboken-e00d987174d56826d9a5fb9ba9983409ad71c375.tar.xz
shiboken-e00d987174d56826d9a5fb9ba9983409ad71c375.zip
Added unit test for virtual destructor.
Diffstat (limited to 'tests/libsample/virtualmethods.h')
-rw-r--r--tests/libsample/virtualmethods.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/libsample/virtualmethods.h b/tests/libsample/virtualmethods.h
index 45d8ae71..cd504d90 100644
--- a/tests/libsample/virtualmethods.h
+++ b/tests/libsample/virtualmethods.h
@@ -86,5 +86,18 @@ public:
};
+class VirtualDtor
+{
+public:
+ VirtualDtor() {}
+ virtual ~VirtualDtor() { VirtualDtor::dtor_called++; }
+
+ static int dtorCalled() { return dtor_called; }
+
+private:
+ static int dtor_called;
+};
+
+
#endif // VIRTUALMETHODS_H