d7d95289bf
Doc: reference updates Doc: shorter lines
33 lines
1.6 KiB
Plaintext
33 lines
1.6 KiB
Plaintext
[/
|
|
/ Copyright (c) 2003 Boost.Test contributors
|
|
/
|
|
/ Distributed under the Boost Software License, Version 1.0. (See accompanying
|
|
/ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
/]
|
|
|
|
[section:tests_grouping Grouping tests into logical units by labels]
|
|
|
|
Test-suites and test cases define a hierarchy called the /test tree/, which is useful for organizing tests. These
|
|
organization defines an implicit grouping of test unit following the /subtrees/ extracted from the test tree, by just
|
|
designing a node on the test tree. Being able to design a group of tests enable, for instance, to execute this group of
|
|
test only (covered in [link boost_test.runtime_config.test_unit_filtering this section]).
|
|
|
|
However, the subtrees might not reflect all the possible grouping of test units the usage of the test module would
|
|
require [footnote For instance, selecting two siblings without the parent node].
|
|
|
|
The __UTF__ provides a flexible way of grouping test units by the use of /labels/, using the decorator
|
|
__decorator_label__. It is possible to associate more than one label with a test unit.
|
|
|
|
Labels can be associated to test cases and test suites. For the latter, the label is inherited by all the nodes in the
|
|
subtree defined by the labelled test suite: decorating a test suite with label `L` is equivalent to decorating every test
|
|
unit inside with `L`.
|
|
|
|
[tip it is possible to list all labels of a test module from the CLI by using the
|
|
[link boost_test.utf_reference.rt_param_reference.list_labels `--list_labels`] switch
|
|
]
|
|
|
|
[bt_example decorator_04..decorator label..run-fail]
|
|
|
|
|
|
[endsect]
|