Menu

Testi function that call abort() with CppUnit

Help
Nick Bova
2004-01-20
2004-01-31
  • Nick Bova

    Nick Bova - 2004-01-20

    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.

     
    • Baptiste Lepilleur

      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.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.