mirror of
https://github.com/D-Modem/app.git
synced 2026-11-29 01:48:05 -08:00
engine_test.cpp's five calls are now four GoogleTest tests, each with a dmodemd of its own, and c_api_test.c is c_api_test.cpp, seven tests (its header still compiled as C, c_api_header.c). ctest registers each test on its own (gtest_discover_tests). GoogleTest is the system's (libgtest-dev, added to the native job) or else fetched, v1.14.0 as D-Modem-RE has it. The USB line tests stay as they were. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B82eRSgB6M9Vp9dEP1haEE
22 lines
472 B
C
22 lines
472 B
C
/*
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
* Copyright (C) 2026 Neo-Desktop
|
|
*
|
|
* c_api_header.c - dmodem_engine.h as a C program has it, for
|
|
* c_api_test: its types and calls from C.
|
|
*
|
|
*/
|
|
|
|
#include "dmodem_engine.h"
|
|
|
|
/* the C API's config and callbacks from C: 0 if the defaults came */
|
|
int c_api_header_from_c(void)
|
|
{
|
|
dmodem_config c;
|
|
dmodem_callbacks cb = { 0 };
|
|
|
|
(void)cb;
|
|
dmodem_config_init(&c);
|
|
return c.sip_port == 5060 ? 0 : 1;
|
|
}
|