cbassa / strf

Radio Frequency Satellite Tracking
GNU General Public License v3.0
169 stars 37 forks source link

Unit tests #48

Open MartinHerren opened 1 year ago

MartinHerren commented 1 year ago

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.