MCPcopy Create free account
hub / github.com/Hamlib/Hamlib / test4_large_cookie_size

Function test4_large_cookie_size

tests/testcookie.c:119–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119static int test4_large_cookie_size()
120{
121 int retcode;
122 char cookie[HAMLIB_COOKIE_SIZE * 2];
123
124 /* Using a larger cookie should also work */
125 retcode = rig_cookie(NULL, RIG_COOKIE_GET, cookie, sizeof(cookie));
126
127 if (retcode == RIG_OK) { printf("Test#4a OK\n"); }
128 else {printf("Test#4a Failed\n"); return 1;}
129
130 /* Cookie should be smaller the maximum specified by lib */
131 //if (strlen(cookie) < HAMLIB_COOKIE_SIZE) { printf("Test#4b OK\n"); }
132 //else {printf("Test#4b Failed\n"); return 1;}
133
134 /* Release the cookie again to clean up */
135 retcode = rig_cookie(NULL, RIG_COOKIE_RELEASE, cookie, sizeof(cookie));
136
137 if (retcode == RIG_OK) { printf("Test#4c OK\n"); }
138 else {printf("Test#4c Failed\n"); return 1;}
139
140 return 0;
141}
142
143int main()
144{

Callers 1

mainFunction · 0.85

Calls 1

rig_cookieFunction · 0.85

Tested by

no test coverage detected