| || |
Unit testing testing of C file
I have developed a C file.
I want to do unit testing of my C file.
Can you please give me any proposal how to do this.
I want to provide input values and expected output values.
Can you please provide me required code which will run my C file and calculate actual output values,also it will compare actual output values, obtained from the c file, with
the expected output value provided by user.
Re: Unit testing testing of C file
First, what is the purpose of your testing?
<ul type="square">[*] test that your code meets its defined requirements[*] test the robustness of your code[*] test because you need to (standards compliance or maybe your boss told you!)[*] create a test to 'baseline' the code to ensure that future changes do not break the existing functionality.[/list]
In all these cases you need to
<ul type="square">[*] set input data[*] call the software under test[*] and optionally check that the output data is correct[/list]
In the last case, the 'baseline' test case, there are tools available to help automate this. By hand you can write the tests and then update the checks on the expected data to make them pass before modifying the code and re-running the test to confirm it still works as expected.
Testing Products Support and Development manager at IPL
, developing Cantata++
- C/C++ testing tool and AdaTEST
- Ada/Ada95 testing tool.