Add unittest
[platform/core/appfw/appcore-widget.git] / test / unit_tests / mock / mock_hook.h
1 /*
2  * Copyright (c) 2020 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef UNIT_TESTS_MOCK_MOCK_HOOK_H_
18 #define UNIT_TESTS_MOCK_MOCK_HOOK_H_
19
20 #define MOCK_HOOK_P0(MOCK_CLASS, f)                                            \
21     TestFixture::GetMock<MOCK_CLASS>().f()
22 #define MOCK_HOOK_P1(MOCK_CLASS, f, p1)                                        \
23     TestFixture::GetMock<MOCK_CLASS>().f(p1)
24 #define MOCK_HOOK_P2(MOCK_CLASS, f, p1, p2)                                    \
25     TestFixture::GetMock<MOCK_CLASS>().f(p1, p2)
26 #define MOCK_HOOK_P3(MOCK_CLASS, f, p1, p2, p3)                                \
27     TestFixture::GetMock<MOCK_CLASS>().f(p1, p2, p3)
28 #define MOCK_HOOK_P4(MOCK_CLASS, f, p1, p2, p3, p4)                            \
29     TestFixture::GetMock<MOCK_CLASS>().f(p1, p2, p3, p4)
30 #define MOCK_HOOK_P5(MOCK_CLASS, f, p1, p2, p3, p4, p5)                        \
31     TestFixture::GetMock<MOCK_CLASS>().f(p1, p2, p3, p4, p5)
32 #define MOCK_HOOK_P6(MOCK_CLASS, f, p1, p2, p3, p4, p5, p6)                    \
33     TestFixture::GetMock<MOCK_CLASS>().f(p1, p2, p3, p4, p5, p6)
34 #define MOCK_HOOK_P7(MOCK_CLASS, f, p1, p2, p3, p4, p5, p6, p7)                \
35     TestFixture::GetMock<MOCK_CLASS>().f(p1, p2, p3, p4, p5, p6, p7)
36 #define MOCK_HOOK_P8(MOCK_CLASS, f, p1, p2, p3, p4, p5, p6, p7, p8)            \
37     TestFixture::GetMock<MOCK_CLASS>().f(p1, p2, p3, p4, p5, p6, p7, p8)
38 #define MOCK_HOOK_P10(MOCK_CLASS, f, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10)  \
39     TestFixture::GetMock<MOCK_CLASS>().f(                                      \
40         p1, p2, p3, p4, p5, p6, p7, p8, p9, p10)
41
42 #endif  // UNIT_TESTS_MOCK_MOCK_HOOK_H_