Netatalk / netatalk

Netatalk is a Free and Open Source AFP fileserver. A *NIX or BSD system running Netatalk is capable of serving many Macintosh clients simultaneously as an AppleShare file server.
https://netatalk.io
GNU General Public License v2.0
332 stars 85 forks source link

Create unit tests #724

Open rdmark opened 7 months ago

rdmark commented 7 months ago

We currently have a handful of integration tests for afpd in the test/ subdir, but the coverage is limited, and no code coverage is being tracked.

Ideally, we'd apply something like googletest / googlemock to achieve atomic unit tests with code coverage metrics.

rdmark commented 1 month ago

This wikipedia article lists a staggering number of unit test frameworks for C.

gtest/gmock leans heavily into the object oriented syntax of C++, and treats C headers as C++ which has some side effects, so it might not be the most elegant choice for this project.

The standout C-centric frameworks in my eyes are:

cmocka is nice for its built-in mocking. Unity is nice for its native Meson support.