1 /*
2 * Copyright 2021 The Android Open Source Project
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 /*
18 * Generated mock file from original source file
19 * Functions generated:6
20 *
21 * mockcify.pl ver 0.3.0
22 */
23 // Mock include file to share data between tests and mock
24 #include "test/mock/mock_osi_wakelock.h"
25
26 #include "test/common/mock_functions.h"
27
28 // Mocked internal structures, if any
29
30 // TODO(b/369381361) Enfore -Wmissing-prototypes
31 #pragma GCC diagnostic ignored "-Wmissing-prototypes"
32
33 namespace test {
34 namespace mock {
35 namespace osi_wakelock {
36
37 // Function state capture and return values, if needed
38 struct wakelock_acquire wakelock_acquire;
39 struct wakelock_cleanup wakelock_cleanup;
40 struct wakelock_debug_dump wakelock_debug_dump;
41 struct wakelock_release wakelock_release;
42 struct wakelock_set_os_callouts wakelock_set_os_callouts;
43 struct wakelock_set_paths wakelock_set_paths;
44
45 } // namespace osi_wakelock
46 } // namespace mock
47 } // namespace test
48
49 // Mocked functions, if any
wakelock_acquire(void)50 bool wakelock_acquire(void) {
51 inc_func_call_count(__func__);
52 return test::mock::osi_wakelock::wakelock_acquire();
53 }
wakelock_cleanup(void)54 void wakelock_cleanup(void) {
55 inc_func_call_count(__func__);
56 test::mock::osi_wakelock::wakelock_cleanup();
57 }
wakelock_debug_dump(int fd)58 void wakelock_debug_dump(int fd) {
59 inc_func_call_count(__func__);
60 test::mock::osi_wakelock::wakelock_debug_dump(fd);
61 }
wakelock_release(void)62 bool wakelock_release(void) {
63 inc_func_call_count(__func__);
64 return test::mock::osi_wakelock::wakelock_release();
65 }
wakelock_set_os_callouts(bt_os_callouts_t * callouts)66 void wakelock_set_os_callouts(bt_os_callouts_t* callouts) {
67 inc_func_call_count(__func__);
68 test::mock::osi_wakelock::wakelock_set_os_callouts(callouts);
69 }
wakelock_set_paths(const char * lock_path,const char * unlock_path)70 void wakelock_set_paths(const char* lock_path, const char* unlock_path) {
71 inc_func_call_count(__func__);
72 test::mock::osi_wakelock::wakelock_set_paths(lock_path, unlock_path);
73 }
74 // Mocked functions complete
75 // END mockcify generation
76