1

What is the meaning of return code of unit_test_main function from Boost Testing Framework ?

Marc Andreson
  • 3,405
  • 5
  • 35
  • 51

1 Answers1

4

As you can find here, unit_test_main can return boost::exit_success if there were no errors or either boost::exit_exception_failure or boost::exit_test_failure depending on whether there were uncaught exceptions or not.

PS: If you pass your test program the command line option --result_code=no, unit_test_main will always return boost::exit_success.

  • 1
    boost::exit_success is return code 0, boost::exit_exception_failure is return code 201, and boost::exit_test_failure is return code 201. On my platform, boost::exit_failure is 1. – dbn Mar 04 '16 at 22:11