diff --git a/docs/unittest_doc.md b/docs/unittest_doc.md
index fe885f2..754ea32 100755
--- a/docs/unittest_doc.md
+++ b/docs/unittest_doc.md
@@ -37,7 +37,7 @@ unittest_toolchain(name, impl, expect_failure, attrs, fragments, config_settings,
+analysistest.make(impl, doc, expect_failure, attrs, fragments, config_settings,
extra_target_under_test_aspects)
@@ -73,6 +73,7 @@ Recall that names of test rules must end in `_test`.
| Name | Description | Default Value |
| :------------- | :------------- | :------------- |
| impl | The implementation function of the unit test. | none |
+| doc | A description of the rule that can be extracted by documentation generating tools. | ""
|
| expect_failure | If true, the analysis test will expect the target_under_test to fail. Assertions can be made on the underlying failure using asserts.expect_failure | False
|
| attrs | An optional dictionary to supplement the attrs passed to the unit test's rule()
constructor. | {}
|
| fragments | An optional list of fragment names that can be used to give rules access to language-specific parts of configuration. | []
|
diff --git a/lib/unittest.bzl b/lib/unittest.bzl
index feea621..519720c 100644
--- a/lib/unittest.bzl
+++ b/lib/unittest.bzl
@@ -206,6 +206,7 @@ _action_retrieving_aspect = aspect(
# TODO(cparsons): Provide more full documentation on analysis testing in README.
def _make_analysis_test(
impl,
+ doc = "",
expect_failure = False,
attrs = {},
fragments = [],
@@ -238,6 +239,7 @@ def _make_analysis_test(
Args:
impl: The implementation function of the unit test.
+ doc: A description of the rule that can be extracted by documentation generating tools.
expect_failure: If true, the analysis test will expect the target_under_test
to fail. Assertions can be made on the underlying failure using asserts.expect_failure
attrs: An optional dictionary to supplement the attrs passed to the
@@ -277,6 +279,7 @@ def _make_analysis_test(
return rule(
impl,
+ doc = doc,
attrs = attrs,
fragments = fragments,
test = True,