You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the decorator works fine for already defined, built-in decorators.
But the functionality is really limited for adding new decorators to doctest.
What is missing is some kind of named annotations storage in a test case.
This mechanism would allow to store decorator name as a string to a test_case (or test_suite), like:
// — EXAMPLE:
#include<doctest/doctest.h>
#include<my_doctest_ext/decorator_verifies.h>
…
TEST_CASE(„Some test …“ * my_doctest_ext::verifies(„REQ-ID_0815“)) {
… // — TEST IMPLEMENTATION DETAILS (left out here)
}
// — ALTERNATIVE: Direct support of annotations as test decoratorTEST_CASE(„Other test …“ * my_doctest_ext::annotation(„verifies“, „REQ-ID_0816“)) {
… // — TEST IMPLEMENTATION DETAILS (left out here)
}
DESIRED FUNCTIONALITY:
My own decorator stores its param(s) in the test case, like:
test_case.add_annotation(„verifies“, „REQ-ID_0815“); // OR SIMILAR
During the test run:
A test reporter could retrieve the annotations and show/store them in the test report
For JUnitXML, the annotations can be stored as properties of the test-case.
OTHERWISE:
A similar functionality with named annotations will also be needed for a test-suite (out-of-symmetry)
NICE TO HAVE: Ability to use add_annotation(…) in the body of a test-case.
The text was updated successfully, but these errors were encountered:
Description
Currently, the
decorator
works fine for already defined, built-in decorators.But the functionality is really limited for adding new decorators to
doctest
.What is missing is some kind of
named annotations
storage in a test case.This mechanism would allow to store decorator name as a string to a
test_case
(ortest_suite
), like:DESIRED FUNCTIONALITY:
test_case.add_annotation(„verifies“, „REQ-ID_0815“); // OR SIMILAR
During the test run:
test-case
.OTHERWISE:
add_annotation(…)
in the body of atest-case
.The text was updated successfully, but these errors were encountered: