here a first PR introducing unit tests. Wanted to do more tests but didn't have time yet. So at least a first version until i have more time.
Adding the CMocka unit test framework
Adding first tests on the TLE reader wrapper and doing minor fixes detected while writing tests
Adding github actions so the tests will run when you push changes
I investigated several unit test frameworks. Choice was limited by
being pure C framework, no need of a C++ compiler
being standard libs available in every debian/ubuntu system
Tested CMocka, CUnit and Check, found CMocka to be best (modern design, maintained, pretty output, easy and complete testing). If you'd prefer CUnit or Check i could easily switch to them.
The goal was to work on 'displaying satellite names' in rfplot which finally takes a little more work than expected and adding unit tests to the TLE loading code was a good start not to break anything.
Will work on this as soon as i have time and will also try to improve testing. Some parts will require more refactory to become testable.
Hi Cees,
here a first PR introducing unit tests. Wanted to do more tests but didn't have time yet. So at least a first version until i have more time.
I investigated several unit test frameworks. Choice was limited by
Tested CMocka, CUnit and Check, found CMocka to be best (modern design, maintained, pretty output, easy and complete testing). If you'd prefer CUnit or Check i could easily switch to them.
The goal was to work on 'displaying satellite names' in rfplot which finally takes a little more work than expected and adding unit tests to the TLE loading code was a good start not to break anything.
Will work on this as soon as i have time and will also try to improve testing. Some parts will require more refactory to become testable.