Traumflug / Teacup_Firmware

Firmware for RepRap and other 3D printers
http://forums.reprap.org/read.php?147
GNU General Public License v2.0
312 stars 199 forks source link

TDD with ceedling #282

Open Wurstnase opened 6 years ago

Wurstnase commented 6 years ago

Some weeks ago I start with playing ceedling. Ceedling is a TDD written in Ruby.

I uploaded a new branch: https://github.com/Traumflug/Teacup_Firmware/tree/debug_tdd

First off all you need to install ceedling. On Linux: gem install ceedling

Next put ceedling and teacup together. One folder below your Teacup_Firmware-folder, when the naming is Teacup_Firmware ceedling new Teacup_Firmware

Now go in the folder and start it with ceedling test:all

When you want a new test for other modules, add a test_yourmodule.c in the test folder. If you want to test static functions, take a look into the test_temp.c example. If added a temp_static.h in the test/inc -folder.

Happy testing...