spiegel-keyman/linux/keyman-system-service/tests/testfixture.cpp
Eberhard Beilharz 4f97b3f38e
chore(linux): add a stub unit test to allow successful coverage reporting
Previously keyman-system-service didn't have any unit tests. With the
gcov/lcov versions available for Ubuntu 24.04 Noble this suddenly caused
a failure when trying to generate the test coverage report, although it
worked fine with older versions.

This change adds a do-nothing unit test stub for keyman-system-service.
This allows to generate the coverage reporting with Ubuntu 24.04 Noble.
2025-04-23 18:52:10 +02:00

18 lines
461 B
C++

#include <glib.h>
typedef struct {
} TestObjectFixture;
// The purpose of this unit "test" is to have a test so that generating code
// coverage report works with Ubuntu 24.04+.
static void test_stub(TestObjectFixture* fixture, gconstpointer user_data) {
g_assert_true(TRUE);
}
int main(int argc, char* argv[]) {
g_test_init(&argc, &argv, NULL);
g_test_add("/test/test_stub", TestObjectFixture, NULL, NULL, test_stub, NULL);
return g_test_run();
}