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:10
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_alarm.h"
25 
26 #include <cstdint>
27 
28 #include "test/common/mock_functions.h"
29 
30 // Mocked internal structures, if any
31 
32 namespace test {
33 namespace mock {
34 namespace osi_alarm {
35 
36 // Function state capture and return values, if needed
37 struct alarm_cancel alarm_cancel;
38 struct alarm_cleanup alarm_cleanup;
39 struct alarm_debug_dump alarm_debug_dump;
40 struct alarm_free alarm_free;
41 struct alarm_get_remaining_ms alarm_get_remaining_ms;
42 struct alarm_is_scheduled alarm_is_scheduled;
43 struct alarm_new alarm_new;
44 struct alarm_new_periodic alarm_new_periodic;
45 struct alarm_set alarm_set;
46 struct alarm_set_on_mloop alarm_set_on_mloop;
47 
48 }  // namespace osi_alarm
49 }  // namespace mock
50 }  // namespace test
51 
52 // Mocked functions, if any
alarm_cancel(alarm_t * alarm)53 void alarm_cancel(alarm_t* alarm) {
54   inc_func_call_count(__func__);
55   test::mock::osi_alarm::alarm_cancel(alarm);
56 }
alarm_cleanup(void)57 void alarm_cleanup(void) {
58   inc_func_call_count(__func__);
59   test::mock::osi_alarm::alarm_cleanup();
60 }
alarm_debug_dump(int fd)61 void alarm_debug_dump(int fd) {
62   inc_func_call_count(__func__);
63   test::mock::osi_alarm::alarm_debug_dump(fd);
64 }
alarm_free(alarm_t * alarm)65 void alarm_free(alarm_t* alarm) {
66   inc_func_call_count(__func__);
67   test::mock::osi_alarm::alarm_free(alarm);
68 }
alarm_get_remaining_ms(const alarm_t * alarm)69 uint64_t alarm_get_remaining_ms(const alarm_t* alarm) {
70   inc_func_call_count(__func__);
71   return test::mock::osi_alarm::alarm_get_remaining_ms(alarm);
72 }
alarm_is_scheduled(const alarm_t * alarm)73 bool alarm_is_scheduled(const alarm_t* alarm) {
74   inc_func_call_count(__func__);
75   return test::mock::osi_alarm::alarm_is_scheduled(alarm);
76 }
alarm_new(const char * name)77 alarm_t* alarm_new(const char* name) {
78   inc_func_call_count(__func__);
79   return test::mock::osi_alarm::alarm_new(name);
80 }
alarm_new_periodic(const char * name)81 alarm_t* alarm_new_periodic(const char* name) {
82   inc_func_call_count(__func__);
83   return test::mock::osi_alarm::alarm_new_periodic(name);
84 }
alarm_set(alarm_t * alarm,uint64_t interval_ms,alarm_callback_t cb,void * data)85 void alarm_set(alarm_t* alarm, uint64_t interval_ms, alarm_callback_t cb,
86                void* data) {
87   inc_func_call_count(__func__);
88   test::mock::osi_alarm::alarm_set(alarm, interval_ms, cb, data);
89 }
alarm_set_on_mloop(alarm_t * alarm,uint64_t interval_ms,alarm_callback_t cb,void * data)90 void alarm_set_on_mloop(alarm_t* alarm, uint64_t interval_ms,
91                         alarm_callback_t cb, void* data) {
92   inc_func_call_count(__func__);
93   test::mock::osi_alarm::alarm_set_on_mloop(alarm, interval_ms, cb, data);
94 }
95 // Mocked functions complete
96 // END mockcify generation
97