Boost logo

Boost :

Subject: [boost] Boost.Test: runtime parameter framework update
From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2015-09-29 13:13:21


Hi,

Over the years there were complains about the interface and functionality
of the Boost.Test Unit Test Framework(UTF)'s runtime parameters. Primarily
command line arguments handling, but also documentation and few other
concerns. This update addresses all these issues, introduces few new
features and makes runtime parameters much more user friendly. In addition
new implementation significantly simpler. Here is short summary of fixed
issues and significant new features:

* (new) UTF now requires all user defined arguments to follow UTF specific
arguments. They are separated by "--" marker. For example:
 test.exe --random -- /myarg:17

* (bug) UTF now properly supports arguments with spaces. For example:
  test.exe --log_sink="file name.txt"

* (bug) UTF now reports missing value in arguments. For example:
  test.exe --log_sink=, produces:
 Missing an argument value for the parameter log_level in the argument --
log_level=

* (bug/new) UTF now reports invalid parameters. Moreover, UTF now supports
hints with possible typos. For example:
  test.exe --colour, produces:

An unrecognized parameter in the argument --colour
 Did you mean one of these?
   color_output

Suggestion is shown when close (1 char distance from unambiguous parameter
name) exists.
* (new) UTF now report possible ambiguous parameters. For example:
 test.exe --log=all, produces:

An ambiguous parameter name in the argument --log=all
 Did you mean one of these?
   log_format
   log_level
   log_sink

* (new) UTF parameter help now accepts optional parameter name. Moreover
you can actually "guess" the name by providing just unambiguous prefix. In
this case it shows detailed information about requested parameter,
including semantic, possible values and formats. For example:

 test.exe --help=list_con, produces:

Parameter: list_content
 Lists the content of test tree - names of all test suites and test cases.
 Command line formats:
   --list_content[=<HRF|DOT>]
 Environment variable: BOOST_TEST_LIST_CONTENT

Parameter list_content instructs the framework to list the content of the
test module instead of executing the test cases. Parameter accepts
optional string value indicating the format of the output. Currently the
framework supports two formats: human readable format (HRF) and dot graph
format (DOT). If value is omitted HRF value is assumed.

The changes will be released with next release of boost.

Any comments are welcome.
Gennadiy


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk