summaryrefslogtreecommitdiffstats
path: root/base/observer_list_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'base/observer_list_unittest.cc')
-rw-r--r--base/observer_list_unittest.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/base/observer_list_unittest.cc b/base/observer_list_unittest.cc
index 6bb1d63..4ae5ac3 100644
--- a/base/observer_list_unittest.cc
+++ b/base/observer_list_unittest.cc
@@ -38,14 +38,16 @@ class ObserverListTest : public testing::Test {
class Foo {
public:
virtual void Observe(int x) = 0;
+ virtual ~Foo() {}
};
class Adder : public Foo {
public:
- Adder(int scaler) : scaler_(scaler), total(0) {}
+ Adder(int scaler) : total(0), scaler_(scaler) {}
virtual void Observe(int x) {
total += x * scaler_;
}
+ virtual ~Adder() { }
int total;
private:
int scaler_;
@@ -55,6 +57,7 @@ class Disrupter : public Foo {
public:
Disrupter(ObserverList<Foo>& list, Foo* doomed) : list_(list), doomed_(doomed) {
}
+ virtual ~Disrupter() { }
virtual void Observe(int x) {
list_.RemoveObserver(doomed_);
}