Is it possible to catch abort() function in test case
and continue execution another tests?
In other words, I now that in tested function
abort() function must be called and I want to test
exactrly this situation.
Is this possible?
How?
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have a hard time to believe you are using abort() in a C++ program...
Anyway, the proper way to test program termination is by looking at the program exit code. It could be done at tool level (e.g. the stuff that run your unit test): run test xyz, and check exit code match abort exit code (3 for msvc).
Baptiste.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
HI!
Is it possible to catch abort() function in test case
and continue execution another tests?
In other words, I now that in tested function
abort() function must be called and I want to test
exactrly this situation.
Is this possible?
How?
Thanks.
I have a hard time to believe you are using abort() in a C++ program...
Anyway, the proper way to test program termination is by looking at the program exit code. It could be done at tool level (e.g. the stuff that run your unit test): run test xyz, and check exit code match abort exit code (3 for msvc).
Baptiste.