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