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:4
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_properties.h"
25
26 #include <cstdint>
27 #include <vector>
28
29 #include "test/common/mock_functions.h"
30
31 // Mocked internal structures, if any
32
33 // TODO(b/369381361) Enfore -Wmissing-prototypes
34 #pragma GCC diagnostic ignored "-Wmissing-prototypes"
35
36 namespace test {
37 namespace mock {
38 namespace osi_properties {
39
40 // Function state capture and return values, if needed
41 struct osi_property_get osi_property_get;
42 struct osi_property_get_bool osi_property_get_bool;
43 struct osi_property_get_int32 osi_property_get_int32;
44 struct osi_property_set osi_property_set;
45
46 } // namespace osi_properties
47 } // namespace mock
48 } // namespace test
49
50 // Mocked functions, if any
osi_property_get(const char * key,char * value,const char * default_value)51 int osi_property_get(const char* key, char* value, const char* default_value) {
52 inc_func_call_count(__func__);
53 return test::mock::osi_properties::osi_property_get(key, value, default_value);
54 }
osi_property_get_bool(const char * key,bool default_value)55 bool osi_property_get_bool(const char* key, bool default_value) {
56 inc_func_call_count(__func__);
57 return test::mock::osi_properties::osi_property_get_bool(key, default_value);
58 }
osi_property_get_int32(const char * key,int32_t default_value)59 int32_t osi_property_get_int32(const char* key, int32_t default_value) {
60 inc_func_call_count(__func__);
61 return test::mock::osi_properties::osi_property_get_int32(key, default_value);
62 }
osi_property_get_uintlist(const char *,std::vector<uint32_t> default_value)63 std::vector<uint32_t> osi_property_get_uintlist(const char* /* key */,
64 std::vector<uint32_t> default_value) {
65 inc_func_call_count(__func__);
66 return default_value;
67 }
osi_property_set(const char * key,const char * value)68 int osi_property_set(const char* key, const char* value) {
69 inc_func_call_count(__func__);
70 return test::mock::osi_properties::osi_property_set(key, value);
71 }
72 // Mocked functions complete
73 // END mockcify generation
74