diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2017-09-13 11:05:34 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2017-09-13 11:06:28 +0900 |
commit | 34bd32e225e2a8a94104489b31c42e5801cc1f4a (patch) | |
tree | d021b579a0c190354819974e1eaf0baa54b551f3 /boost/test/impl/unit_test_parameters.ipp | |
parent | f763a99a501650eff2c60288aa6f10ef916d769e (diff) | |
download | boost-34bd32e225e2a8a94104489b31c42e5801cc1f4a.tar.gz boost-34bd32e225e2a8a94104489b31c42e5801cc1f4a.tar.bz2 boost-34bd32e225e2a8a94104489b31c42e5801cc1f4a.zip |
Imported Upstream version 1.63.0upstream/1.63.0
Change-Id: Iac85556a04b7e58d63ba636dedb0986e3555714a
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'boost/test/impl/unit_test_parameters.ipp')
-rw-r--r-- | boost/test/impl/unit_test_parameters.ipp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/boost/test/impl/unit_test_parameters.ipp b/boost/test/impl/unit_test_parameters.ipp index f49079ea3e..315942e6c0 100644 --- a/boost/test/impl/unit_test_parameters.ipp +++ b/boost/test/impl/unit_test_parameters.ipp @@ -99,6 +99,7 @@ std::string WAIT_FOR_DEBUGGER = "wait_for_debugger"; std::string HELP = "help"; std::string USAGE = "usage"; +std::string VERSION = "version"; //____________________________________________________________________________// @@ -148,12 +149,11 @@ register_parameters( rt::parameters_store& store ) "compiler, STL version and Boost version." )); - /////////////////////////////////////////////// - build_info.add_cla_id( "--", BUILD_INFO, "=" ); build_info.add_cla_id( "-", "i", " " ); store.add( build_info ); + /////////////////////////////////////////////// rt::option catch_sys_errors( CATCH_SYS_ERRORS, ( rt::description = "Allows to switch between catching and ignoring system errors (signals).", @@ -635,6 +635,14 @@ register_parameters( rt::parameters_store& store ) )); usage.add_cla_id( "-", "?", " " ); store.add( usage ); + + /////////////////////////////////////////////// + + rt::option version( VERSION, ( + rt::description = "Prints Boost.Test version and exits." + )); + version.add_cla_id( "--", VERSION, " " ); + store.add( version ); } static rt::arguments_store s_arguments_store; @@ -668,7 +676,11 @@ init( int& argc, char** argv ) rt::finalize_arguments( s_parameters_store, s_arguments_store ); // Report help if requested - if( runtime_config::get<bool>( USAGE ) ) { + if( runtime_config::get<bool>( VERSION ) ) { + parser->version( std::cerr ); + BOOST_TEST_I_THROW( framework::nothing_to_test( boost::exit_success ) ); + } + else if( runtime_config::get<bool>( USAGE ) ) { parser->usage( std::cerr ); BOOST_TEST_I_THROW( framework::nothing_to_test( boost::exit_success ) ); } |