summaryrefslogtreecommitdiff
path: root/src/components/utils/test/scope_guard_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/utils/test/scope_guard_test.cc')
-rw-r--r--src/components/utils/test/scope_guard_test.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/components/utils/test/scope_guard_test.cc b/src/components/utils/test/scope_guard_test.cc
index 85abbd90de..5e685d6aba 100644
--- a/src/components/utils/test/scope_guard_test.cc
+++ b/src/components/utils/test/scope_guard_test.cc
@@ -43,7 +43,7 @@ using ::utils::MakeGuard;
using ::utils::MakeObjGuard;
using ::testing::Mock;
-class TestObject {
+class TestCalleeObject {
public:
MOCK_METHOD0(function_to_call, void());
MOCK_METHOD1(function_to_call_with_param, void(void*));
@@ -68,21 +68,21 @@ TEST(ScopeGuardTest, CallFreeFunctionWithParam) {
}
TEST(ScopeGuardTest, CallObjectFunction) {
- TestObject obj;
+ TestCalleeObject obj;
Mock::AllowLeak(&obj); // Google tests bug
EXPECT_CALL(obj, function_to_call()).Times(1);
{
- ScopeGuard guard = MakeObjGuard(obj, &TestObject::function_to_call);
+ ScopeGuard guard = MakeObjGuard(obj, &TestCalleeObject::function_to_call);
UNUSED(guard);
}
}
TEST(ScopeGuardTest, CallObjectFunctionWithParam) {
- TestObject obj;
+ TestCalleeObject obj;
EXPECT_CALL(obj, function_to_call_with_param(&obj)).Times(1);
{
ScopeGuard guard =
- MakeObjGuard(obj, &TestObject::function_to_call_with_param, &obj);
+ MakeObjGuard(obj, &TestCalleeObject::function_to_call_with_param, &obj);
UNUSED(guard);
}
}
@@ -98,20 +98,20 @@ TEST(ScopeGuardTest, DismissCallFreeFunctionWithParam) {
}
TEST(ScopeGuardTest, DismissCallObjectFunction) {
- TestObject obj;
+ TestCalleeObject obj;
EXPECT_CALL(obj, function_to_call()).Times(0);
{
- ScopeGuard guard = MakeObjGuard(obj, &TestObject::function_to_call);
+ ScopeGuard guard = MakeObjGuard(obj, &TestCalleeObject::function_to_call);
guard.Dismiss();
}
}
TEST(ScopeGuardTest, DismissCallObjectFunctionWithParam) {
- TestObject obj;
+ TestCalleeObject obj;
EXPECT_CALL(obj, function_to_call_with_param(&obj)).Times(0);
{
ScopeGuard guard =
- MakeObjGuard(obj, &TestObject::function_to_call_with_param, &obj);
+ MakeObjGuard(obj, &TestCalleeObject::function_to_call_with_param, &obj);
guard.Dismiss();
}
}