40 #include <gtest/gtest.h> 57 bool methodExecuted =
false;
60 methodExecuted =
true;
64 TEST(CallbackQueueTest, GetName)
70 TEST(CallbackQueueTest, IsEmpty)
76 TEST(CallbackQueueTest, IsNotEmpty)
80 callbackQueue.
add(&impl);
84 TEST(CallbackQueueTest, AddOneAndProcess)
88 callbackQueue.
add(&impl);
96 TEST(CallbackQueueTest, AddManyAndProcess)
103 callbackQueue.
add(&impl1);
104 callbackQueue.
add(&impl2);
105 callbackQueue.
add(&impl3);
106 callbackQueue.
add(&impl4);
119 TEST(CallbackQueueTest, ClearQueue)
123 callbackQueue.
add(&callbackImpl);
125 callbackQueue.
clear();
129 TEST(CallbackQueueTest, MakeCallbackAddByReference)
140 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.