Skip to content

Commit 1bbb388

Browse files
tidefieldtetromino
andauthored
Update unittest_doc.md with analysistest and loadingtest modules (#370)
Co-authored-by: Alexandre Rostovtsev <[email protected]>
1 parent 69b4636 commit 1bbb388

File tree

2 files changed

+24
-6
lines changed

2 files changed

+24
-6
lines changed

docs/unittest_doc.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,18 @@
22

33
Unit testing support.
44

5-
Unlike most Skylib files, this exports two modules: `unittest` which contains
6-
functions to declare and define unit tests, and `asserts` which contains the
7-
assertions used to within tests.
5+
Unlike most Skylib files, this exports four modules:
6+
* `unittest` contains functions to declare and define unit tests for ordinary
7+
Starlark functions;
8+
* `analysistest` contains functions to declare and define tests for analysis
9+
phase behavior of a rule, such as a given target's providers or registered
10+
actions;
11+
* `loadingtest` contains functions to declare and define tests for loading
12+
phase behavior, such as macros and `native.*`;
13+
* `asserts` contains the assertions used within tests.
14+
15+
See https://bazel.build/extending/concepts for background about macros, rules,
16+
and the different phases of a build.
817

918

1019
<a id="#unittest_toolchain"></a>

lib/unittest.bzl

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,18 @@
1414

1515
"""Unit testing support.
1616
17-
Unlike most Skylib files, this exports two modules: `unittest` which contains
18-
functions to declare and define unit tests, and `asserts` which contains the
19-
assertions used to within tests.
17+
Unlike most Skylib files, this exports four modules:
18+
* `unittest` contains functions to declare and define unit tests for ordinary
19+
Starlark functions;
20+
* `analysistest` contains functions to declare and define tests for analysis
21+
phase behavior of a rule, such as a given target's providers or registered
22+
actions;
23+
* `loadingtest` contains functions to declare and define tests for loading
24+
phase behavior, such as macros and `native.*`;
25+
* `asserts` contains the assertions used within tests.
26+
27+
See https://bazel.build/extending/concepts for background about macros, rules,
28+
and the different phases of a build.
2029
"""
2130

2231
load(":new_sets.bzl", new_sets = "sets")

0 commit comments

Comments
 (0)