Debian Codegraph @

src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/tests/real_test_files/real_strings.h

raw
1 // Copyright (c) Microsoft. All rights reserved.
2 // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
4 #ifndef REAL_STRINGS_H
5 #define REAL_STRINGS_H
6
7 #define REGISTER_STRING_GLOBAL_MOCK_HOOK \
8 REGISTER_GLOBAL_MOCK_HOOK(STRING_new, real_STRING_new); \
9 REGISTER_GLOBAL_MOCK_FAIL_RETURN(STRING_new, NULL); \
10 REGISTER_GLOBAL_MOCK_HOOK(STRING_clone, real_STRING_clone); \
11 REGISTER_GLOBAL_MOCK_FAIL_RETURN(STRING_clone, NULL); \
12 REGISTER_GLOBAL_MOCK_HOOK(STRING_construct, real_STRING_construct); \
13 REGISTER_GLOBAL_MOCK_FAIL_RETURN(STRING_construct, NULL); \
14 REGISTER_GLOBAL_MOCK_HOOK(STRING_construct_n, real_STRING_construct_n); \
15 REGISTER_GLOBAL_MOCK_FAIL_RETURN(STRING_construct_n, NULL); \
16 REGISTER_GLOBAL_MOCK_HOOK(STRING_new_with_memory, real_STRING_new_with_memory); \
17 REGISTER_GLOBAL_MOCK_FAIL_RETURN(STRING_new_with_memory, NULL); \
18 REGISTER_GLOBAL_MOCK_HOOK(STRING_new_quoted, real_STRING_new_quoted); \
19 REGISTER_GLOBAL_MOCK_FAIL_RETURN(STRING_new_quoted, NULL); \
20 REGISTER_GLOBAL_MOCK_HOOK(STRING_new_JSON, real_STRING_new_JSON); \
21 REGISTER_GLOBAL_MOCK_FAIL_RETURN(STRING_new_JSON, NULL); \
22 REGISTER_GLOBAL_MOCK_HOOK(STRING_from_byte_array, real_STRING_from_byte_array); \
23 REGISTER_GLOBAL_MOCK_FAIL_RETURN(STRING_from_byte_array, NULL); \
24 REGISTER_GLOBAL_MOCK_HOOK(STRING_delete, real_STRING_delete); \
25 REGISTER_GLOBAL_MOCK_HOOK(STRING_concat, real_STRING_concat); \
26 REGISTER_GLOBAL_MOCK_FAIL_RETURN(STRING_concat, __LINE__); \
27 REGISTER_GLOBAL_MOCK_HOOK(STRING_concat_with_STRING, real_STRING_concat_with_STRING); \
28 REGISTER_GLOBAL_MOCK_FAIL_RETURN(STRING_concat_with_STRING, __LINE__); \
29 REGISTER_GLOBAL_MOCK_HOOK(STRING_quote, real_STRING_quote); \
30 REGISTER_GLOBAL_MOCK_FAIL_RETURN(STRING_quote, __LINE__); \
31 REGISTER_GLOBAL_MOCK_HOOK(STRING_copy, real_STRING_copy); \
32 REGISTER_GLOBAL_MOCK_FAIL_RETURN(STRING_copy, __LINE__); \
33 REGISTER_GLOBAL_MOCK_HOOK(STRING_copy_n, real_STRING_copy_n); \
34 REGISTER_GLOBAL_MOCK_FAIL_RETURN(STRING_copy_n, __LINE__); \
35 REGISTER_GLOBAL_MOCK_HOOK(STRING_c_str, real_STRING_c_str); \
36 REGISTER_GLOBAL_MOCK_HOOK(STRING_empty, real_STRING_empty); \
37 REGISTER_GLOBAL_MOCK_FAIL_RETURN(STRING_empty, __LINE__); \
38 REGISTER_GLOBAL_MOCK_HOOK(STRING_length, real_STRING_length); \
39 REGISTER_GLOBAL_MOCK_HOOK(STRING_compare, real_STRING_compare); \
40 REGISTER_GLOBAL_MOCK_HOOK(STRING_replace, real_STRING_replace); \
41 REGISTER_GLOBAL_MOCK_FAIL_RETURN(STRING_replace, __LINE__);
42
43 #define STRING_new real_STRING_new
44 #define STRING_clone real_STRING_clone
45 #define STRING_construct real_STRING_construct
46 #define STRING_construct_n real_STRING_construct_n
47 #define STRING_new_with_memory real_STRING_new_with_memory
48 #define STRING_new_quoted real_STRING_new_quoted
49 #define STRING_new_JSON real_STRING_new_JSON
50 #define STRING_from_byte_array real_STRING_from_byte_array
51 #define STRING_delete real_STRING_delete
52 #define STRING_concat real_STRING_concat
53 #define STRING_concat_with_STRING real_STRING_concat_with_STRING
54 #define STRING_quote real_STRING_quote
55 #define STRING_copy real_STRING_copy
56 #define STRING_copy_n real_STRING_copy_n
57 #define STRING_c_str real_STRING_c_str
58 #define STRING_empty real_STRING_empty
59 #define STRING_length real_STRING_length
60 #define STRING_compare real_STRING_compare
61 #define STRING_replace real_STRING_replace
62
63
64 #undef STRINGS_H
65 #include "azure_c_shared_utility/strings.h"
66
67 #ifndef COMPILING_REAL_STRINGS_C
68
69 #undef STRING_new
70 #undef STRING_clone
71 #undef STRING_construct
72 #undef STRING_construct_n
73 #undef STRING_new_with_memory
74 #undef STRING_new_quoted
75 #undef STRING_new_JSON
76 #undef STRING_from_byte_array
77 #undef STRING_delete
78 #undef STRING_concat
79 #undef STRING_concat_with_STRING
80 #undef STRING_quote
81 #undef STRING_copy
82 #undef STRING_copy_n
83 #undef STRING_c_str
84 #undef STRING_empty
85 #undef STRING_length
86 #undef STRING_compare
87 #undef STRING_replace
88
89 #endif
90
91 #undef STRINGS_H
92
93 #endif