Home | History | Annotate | Download | only in base

Lines Matching refs:Adder

26 class Adder : public Foo {
28 explicit Adder(int scaler) : total(0), scaler_(scaler) {}
32 virtual ~Adder() { }
69 adder(1) {
74 observer_list->AddObserver(&adder);
80 Adder adder;
178 Adder a(1), b(-1), c(1), d(-1);
203 Adder a(1);
204 Adder b(-1);
205 Adder c(1);
206 Adder d(-1);
257 Adder b(1);
283 Adder a(1);
284 Adder b(-1);
285 Adder c(1);
286 Adder d(-1);
329 Adder a(1);
338 // B's adder should not have been notified because it was added during
340 EXPECT_EQ(0, b.adder.total);
342 // Notify again to make sure b's adder is notified.
344 EXPECT_EQ(1, b.adder.total);
359 const Adder& adder() const { return adder_; }
365 Adder adder_;
376 EXPECT_EQ(1, a.adder().total)
377 << "Adder should observe once and have sum of 1.";
388 EXPECT_EQ(0, a.adder().total)
389 << "Adder should not observe, so sum should still be 0.";