38 #include <gtest/gtest.h> 55 bool methodExecuted =
false;
58 methodExecuted =
true;
62 TEST(CallbackQueueTest, GetName)
68 TEST(CallbackQueueTest, IsEmpty)
74 TEST(CallbackQueueTest, IsNotEmpty)
78 callbackQueue.
add(&impl);
82 TEST(CallbackQueueTest, AddOneAndProcess)
86 callbackQueue.
add(&impl);
94 TEST(CallbackQueueTest, AddManyAndProcess)
101 callbackQueue.
add(&impl1);
102 callbackQueue.
add(&impl2);
103 callbackQueue.
add(&impl3);
104 callbackQueue.
add(&impl4);
117 TEST(CallbackQueueTest, ClearQueue)
121 callbackQueue.
add(&callbackImpl);
123 callbackQueue.
clear();
127 TEST(CallbackQueueTest, MakeCallbackAddByReference)
138 TEST(CallbackQueueTest, MakeCallbackAddByPointer)
void process()
process all callbacks
TEST(CallbackQueueTest, GetName)
#define EXPECT_TRUE(expr)
A macro which verifies that expr evaluates to true.
void add(Callback *callback)
Add a callback to the end of the queue.
#define EXPECT_FALSE(expr)
A macro which verifies that expr evaluates to false.
void clear()
clear the callback queue
void process()
virtual process function that is invoked when the callback queue is executed.
bool empty() const
Find out if there are any callbacks in the queue.
#define EXPECT_EQ(lhs, rhs)
A macro which verifies that lhs and rhs are equal to each other.