A Tool to Automatically Detect Defects in C++ Programs

In this work a tool is developed to generate test cases automatically for C++ programs. This approach analyses the prototypes. When data type differs, the compiler raises a warning and implicitly converts and performs the operation. This may affect further computations in number crunching applications. So, the tool checks the data type of the actual parameters and formal parameters for a exact match. If a match doesn't occur, the tool reports this situation. This implementation is mainly focused to detect defects in the program. A defect results due to omission or mismanipulation. This work checks the correctness of the program when operator [] is overloaded. In the context of inheritance when virtual function is used, it has been observed that expected results are not achieved under certain circumstances. A test case has been developed to handle this situation and prepared to ascertain the working of template functions in the context of character input, to tackle dangling reference problem and to ascertain the working of the program, in the context of exception handling.