17 #include <gtest/gtest.h> 18 #include <gmock/gmock.h> 61 std::function<void(const int&)> lambda = [&listened_value](
const int ¤tValue){listened_value = currentValue;};
68 EXPECT_EQ(second_set, listened_value);
79 EXPECT_EQ(second_set, listened_value);
92 int first_set = VALID_2;
98 auto bad_lambda = [&listened_value](
const int ¤tValue){
99 switch(currentValue) {
102 listened_value = currentValue;
109 int good_listened_value;
110 auto lambda = [&good_listened_value](
const int ¤tValue) {good_listened_value = currentValue;};
120 EXPECT_EQ(VALID_1, listened_value);
121 EXPECT_EQ(VALID_1, good_listened_value);
128 EXPECT_EQ(INVALID, good_listened_value);
129 EXPECT_EQ(VALID_1 , listened_value);
138 int main(
int argc,
char **argv) {
139 ::testing::InitGoogleTest(&argc, argv);
140 return RUN_ALL_TESTS();
std::shared_ptr< ObservableObject< int > > testIntObservable
TEST_F(ObservableObjectTest, Sanity)
int main(int argc, char **argv)