Hacker News new | past | comments | ask | show | jobs | submit login

I use minunit, http://www.jera.com/techinfo/jtns/jtn002.html, in my embedded projects. The tricky part when unit testing embedded stuff is separating stuff that works on "pure data" from stuff that has a dependency on the hardware. For example, if a function uses a hardware sensor input to calculate a value, you either have to encapsulate that input into a function you can mock, or pass it as a parameter and avoid mocking altogether. The good news is that forces you to use a more well-separated design, eg with separate .c modules to read discrete and analog values, so it ends up being more maintainable.



Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: