summaryrefslogtreecommitdiffstats
path: root/tests/libsample/virtualmethods.h
diff options
context:
space:
mode:
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