3
votes
4answers
199 views

Testing a file that relies heavily on a static array

I have a .c file that basically manages its own little database of people. There are add, remove, edit and search functions among some others. It has a static array which it uses to store the data. ...
1
vote
2answers
2k views

How can I do test automation using a python script to test a c program?

I was wondering if I can use a Python script to test a C program automatically. Suppose I have a very simple C program which reads data (numbers as test cases) from the console, calculates them, then ...
11
votes
5answers
908 views

How can I improve my error checking and handling?

Lately I have been struggling to understand what the right amount of checking is and what the proper methods are. I have a few questions regarding this: What is the proper way to check for errors ...
5
votes
2answers
305 views

Writing functional tests for a legacy project

I am trying to add a couple of tests to a legacy C project. The project basically consists of a command line tool that prints something to stdout every time an event happens. Now, since writing unit ...