• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //  Copyright (c) 2018 Raffi Enficiaud
2 //  Distributed under the Boost Software License, Version 1.0.
3 //  (See accompanying file LICENSE_1_0.txt or copy at
4 //  http://www.boost.org/LICENSE_1_0.txt)
5 
6 //  See http://www.boost.org/libs/test for the library home page.
7 
8 //[example_code
9 #define BOOST_TEST_MODULE runtime_configuration1
10 #include <boost/test/included/unit_test.hpp>
11 using namespace boost::unit_test;
12 
BOOST_AUTO_TEST_CASE(test_accessing_command_line)13 BOOST_AUTO_TEST_CASE(test_accessing_command_line)
14 {
15     BOOST_TEST_REQUIRE( framework::master_test_suite().argc == 3 );
16     BOOST_TEST( framework::master_test_suite().argv[1] == "--specific-param" );
17     BOOST_TEST( framework::master_test_suite().argv[2] == "'additional value with quotes'" );
18     BOOST_TEST_MESSAGE( "'argv[0]' contains " << framework::master_test_suite().argv[0] );
19 }
20 //]
21