Lines Matching refs:count
38 void Increment(int* count) { in Increment() argument
39 (*count)++; in Increment()
42 void IncrementBy(int* count, int n) { in IncrementBy() argument
43 (*count) += n; in IncrementBy()
47 int count = 0; in TEST_F() local
48 auto wrapped_callback = registry_->Register(Bind(&Increment, Unretained(&count))); in TEST_F()
50 EXPECT_EQ(count, 1); in TEST_F()
52 EXPECT_EQ(count, 2); in TEST_F()
54 EXPECT_EQ(count, 3); in TEST_F()
59 int count = 0; in TEST_F() local
60 auto wrapped_callback = registry_->Register(Bind(&Increment, Unretained(&count))); in TEST_F()
63 EXPECT_EQ(count, 0); in TEST_F()
67 int count = 0; in TEST_F() local
68 auto wrapped_callback = registry_->Register(Bind(&Increment, Unretained(&count))); in TEST_F()
70 auto wrapped_callback2 = registry_->Register(Bind(&Increment, Unretained(&count))); in TEST_F()
72 EXPECT_EQ(count, 0); in TEST_F()
74 EXPECT_EQ(count, 1); in TEST_F()
91 int count = 0; in TEST_F() local
92 auto wrapped_callback = registry_->Register(0, Bind(&Increment, Unretained(&count))); in TEST_F()
94 EXPECT_EQ(count, 1); in TEST_F()
96 EXPECT_EQ(count, 2); in TEST_F()
98 EXPECT_EQ(count, 3); in TEST_F()
103 int count = 0; in TEST_F() local
104 auto wrapped_callback0 = registry_->Register(0, Bind(&Increment, Unretained(&count))); in TEST_F()
105 auto wrapped_callback1 = registry_->Register(1, Bind(&IncrementBy, Unretained(&count), 10)); in TEST_F()
107 EXPECT_EQ(count, 1); in TEST_F()
109 EXPECT_EQ(count, 11); in TEST_F()
112 EXPECT_EQ(count, 11); in TEST_F()
114 EXPECT_EQ(count, 21); in TEST_F()
116 EXPECT_EQ(count, 21); in TEST_F()