diff options
author | Vinh Tran <daivinhtran.vt@gmail.com> | 2022-08-26 09:21:43 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-26 09:21:43 -0400 |
commit | 1bbb388780f6016b6981a2f075fb457e999bc3bd (patch) | |
tree | c5b2b3185465e34eb2618a81f5a7187bb098d44b | |
parent | 69b4636956c55b620c0776f4262a38a15554169c (diff) | |
download | bazel-skylib-1bbb388780f6016b6981a2f075fb457e999bc3bd.tar.gz |
Update unittest_doc.md with analysistest and loadingtest modules (#370)
Co-authored-by: Alexandre Rostovtsev <arostovtsev@google.com>
-rwxr-xr-x | docs/unittest_doc.md | 15 | ||||
-rw-r--r-- | lib/unittest.bzl | 15 |
2 files changed, 24 insertions, 6 deletions
diff --git a/docs/unittest_doc.md b/docs/unittest_doc.md index facd55f..a8e4a5a 100755 --- a/docs/unittest_doc.md +++ b/docs/unittest_doc.md @@ -2,9 +2,18 @@ Unit testing support. -Unlike most Skylib files, this exports two modules: `unittest` which contains -functions to declare and define unit tests, and `asserts` which contains the -assertions used to within tests. +Unlike most Skylib files, this exports four modules: +* `unittest` contains functions to declare and define unit tests for ordinary + Starlark functions; +* `analysistest` contains functions to declare and define tests for analysis + phase behavior of a rule, such as a given target's providers or registered + actions; +* `loadingtest` contains functions to declare and define tests for loading + phase behavior, such as macros and `native.*`; +* `asserts` contains the assertions used within tests. + +See https://bazel.build/extending/concepts for background about macros, rules, +and the different phases of a build. <a id="#unittest_toolchain"></a> diff --git a/lib/unittest.bzl b/lib/unittest.bzl index badb462..4398f16 100644 --- a/lib/unittest.bzl +++ b/lib/unittest.bzl @@ -14,9 +14,18 @@ """Unit testing support. -Unlike most Skylib files, this exports two modules: `unittest` which contains -functions to declare and define unit tests, and `asserts` which contains the -assertions used to within tests. +Unlike most Skylib files, this exports four modules: +* `unittest` contains functions to declare and define unit tests for ordinary + Starlark functions; +* `analysistest` contains functions to declare and define tests for analysis + phase behavior of a rule, such as a given target's providers or registered + actions; +* `loadingtest` contains functions to declare and define tests for loading + phase behavior, such as macros and `native.*`; +* `asserts` contains the assertions used within tests. + +See https://bazel.build/extending/concepts for background about macros, rules, +and the different phases of a build. """ load(":new_sets.bzl", new_sets = "sets") |