Lines Matching refs:var
64 DefaultVariable<int> var("var", kVariableModeConst); in TEST_F() local
65 EXPECT_EQ(var.GetName(), string("var")); in TEST_F()
69 DefaultVariable<int> var("var", kVariableModeConst); in TEST_F() local
70 EXPECT_EQ(var.GetMode(), kVariableModeConst); in TEST_F()
83 DefaultVariable<int> var("var", TimeDelta::FromMinutes(3)); in TEST_F() local
84 EXPECT_EQ(var.GetMode(), kVariableModePoll); in TEST_F()
85 EXPECT_EQ(var.GetPollInterval(), TimeDelta::FromMinutes(3)); in TEST_F()
99 DefaultVariable<int> var("var", kVariableModeAsync); in TEST_F() local
101 var.AddObserver(&observer); in TEST_F()
102 EXPECT_EQ(1U, var.observer_list_.size()); in TEST_F()
103 var.AddObserver(&observer); in TEST_F()
104 EXPECT_EQ(1U, var.observer_list_.size()); in TEST_F()
105 var.RemoveObserver(&observer); in TEST_F()
106 EXPECT_EQ(0U, var.observer_list_.size()); in TEST_F()
107 var.RemoveObserver(&observer); in TEST_F()
108 EXPECT_EQ(0U, var.observer_list_.size()); in TEST_F()
112 DefaultVariable<int> var("var", kVariableModeAsync); in TEST_F() local
114 var.AddObserver(&observer1); in TEST_F()
116 var.NotifyValueChanged(); in TEST_F()
122 EXPECT_EQ(&var, observer1.calls_[0]); in TEST_F()
125 var.AddObserver(&observer2); in TEST_F()
126 var.NotifyValueChanged(); in TEST_F()
133 var.RemoveObserver(&observer1); in TEST_F()
134 var.RemoveObserver(&observer2); in TEST_F()
162 DefaultVariable<int> var("var", kVariableModeAsync); in TEST_F() local
166 var.AddObserver(&observer1); in TEST_F()
167 var.AddObserver(&observer2); in TEST_F()
175 var.NotifyValueChanged(); in TEST_F()