J
James Harris
What do you guys use for testing C code? From web searches there seem to be
common ways for some languages but for C there doesn't seem to be any
particular consensus.
I am looking for an approach in preference to a package or a framework.
Simple and adequate is better than comprehensive and complex.
If I have to use a package (which is not cross-platform) this is to run on
Linux. But as I say an approach would be best - something I can write myself
without too much hassle. At the moment I am using ad-hoc code but there has
to be a better way.
My main focus is on how best to do unit testing and regression testing so
any comments on those would be appreciated.
BTW, I have considered more esoteric approaches like behavioural testing.
That approach looked great - though was mainly focussed on acceptance
tests - but I couldn't see how behavioral checks would adequately manage
changes of state in the system under test. Most of my code changes state as
it runs. Nor did behavioral verification seem good for testing range limits.
However, it looked like it could be made very useful - possibly with a
variation in approach. I mention it purely in case anyone else has had
similar experiences and wanted to discuss.
James
common ways for some languages but for C there doesn't seem to be any
particular consensus.
I am looking for an approach in preference to a package or a framework.
Simple and adequate is better than comprehensive and complex.
If I have to use a package (which is not cross-platform) this is to run on
Linux. But as I say an approach would be best - something I can write myself
without too much hassle. At the moment I am using ad-hoc code but there has
to be a better way.
My main focus is on how best to do unit testing and regression testing so
any comments on those would be appreciated.
BTW, I have considered more esoteric approaches like behavioural testing.
That approach looked great - though was mainly focussed on acceptance
tests - but I couldn't see how behavioral checks would adequately manage
changes of state in the system under test. Most of my code changes state as
it runs. Nor did behavioral verification seem good for testing range limits.
However, it looked like it could be made very useful - possibly with a
variation in approach. I mention it purely in case anyone else has had
similar experiences and wanted to discuss.
James