C

Asked • 06/11/19

Unit Testing C Code?

I worked on an embedded system this summer written in straight C. It was an existing project that the company I work for had taken over. I have become quite accustomed to writing unit tests in Java using JUnit but was at a loss as to the best way to write unit tests for existing code (which needed refactoring) as well as new code added to the system.Is there any way to make unit testing plain C code as easy as unit testing Java code with, for example, _JUnit_? Any insight that would apply specifically to embedded development (cross-compiling to arm-linux platform) would be greatly appreciated.

1 Expert Answer

By:

JOSHUA S. answered • 11/13/19

Tutor
0 (0)

Professional Software Engineer

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.