aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorc-parsons <cparsons@google.com>2019-05-08 10:34:47 -0400
committerLaurent Le Brun <laurentlb@gmail.com>2019-05-08 16:34:47 +0200
commit67ecd632735a45267da051003d7eaf8d8ca1b998 (patch)
tree1eb8de419f13af09717493a43c74859171bb51a3
parent84a12d1084bd156b4c0ed3f313299d2afdb5fe43 (diff)
downloadbazel-skylib-67ecd632735a45267da051003d7eaf8d8ca1b998.tar.gz
Minor formatting changes plus doc updates (#147)
-rwxr-xr-xdocs/analysis_test_doc.md1
-rwxr-xr-xdocs/diff_test_doc.md19
-rwxr-xr-xdocs/unittest_doc.md14
-rw-r--r--rules/analysis_test.bzl3
-rwxr-xr-xtests/analysis_test_test.sh2
-rwxr-xr-xtests/unittest_test.sh2
6 files changed, 18 insertions, 23 deletions
diff --git a/docs/analysis_test_doc.md b/docs/analysis_test_doc.md
index 762a82a..817be66 100755
--- a/docs/analysis_test_doc.md
+++ b/docs/analysis_test_doc.md
@@ -31,7 +31,6 @@ Test rule checking that other targets can be successfully analyzed.
Args:
name: The name of the test rule.
targets: A list of targets to ensure build.
-
### Attributes
diff --git a/docs/diff_test_doc.md b/docs/diff_test_doc.md
index ec29077..07ce8b9 100755
--- a/docs/diff_test_doc.md
+++ b/docs/diff_test_doc.md
@@ -1,14 +1,12 @@
## diff_test
<pre>
-diff_test(<a href="#diff_test-name">name</a>, <a href="#diff_test-file1">file1</a>, <a href="#diff_test-file2">file2</a>, <a href="#diff_test-expect_same">expect_same</a>, <a href="#diff_test-kwargs">kwargs</a>)
+diff_test(<a href="#diff_test-name">name</a>, <a href="#diff_test-file1">file1</a>, <a href="#diff_test-file2">file2</a>, <a href="#diff_test-kwargs">kwargs</a>)
</pre>
-A test that compares the contents of two files.
+A test that compares two files.
-The test succeeds when the files are expected to be the same (with regard to
-file contents) and are in fact the same, or when the files are expected to
-be different and are in fact so.
+The test succeeds if the files' contents match.
### Parameters
@@ -46,17 +44,6 @@ be different and are in fact so.
</p>
</td>
</tr>
- <tr id="diff_test-expect_same">
- <td><code>expect_same</code></td>
- <td>
- optional. default is <code>True</code>
- <p>
- Whether the files are expected to be the same or not. The
- test passes if this is True and the files are the same, or if this is
- False and the files are not the same.
- </p>
- </td>
- </tr>
<tr id="diff_test-kwargs">
<td><code>kwargs</code></td>
<td>
diff --git a/docs/unittest_doc.md b/docs/unittest_doc.md
index 2256d12..4fbd96f 100755
--- a/docs/unittest_doc.md
+++ b/docs/unittest_doc.md
@@ -55,7 +55,7 @@ unittest_toolchain(<a href="#unittest_toolchain-name">name</a>, <a href="#unitte
## analysistest.make
<pre>
-analysistest.make(<a href="#analysistest.make-impl">impl</a>, <a href="#analysistest.make-expect_failure">expect_failure</a>, <a href="#analysistest.make-config_settings">config_settings</a>)
+analysistest.make(<a href="#analysistest.make-impl">impl</a>, <a href="#analysistest.make-expect_failure">expect_failure</a>, <a href="#analysistest.make-attrs">attrs</a>, <a href="#analysistest.make-config_settings">config_settings</a>)
</pre>
Creates an analysis test rule from its implementation function.
@@ -111,6 +111,16 @@ Recall that names of test rules must end in `_test`.
</p>
</td>
</tr>
+ <tr id="analysistest.make-attrs">
+ <td><code>attrs</code></td>
+ <td>
+ optional. default is <code>{}</code>
+ <p>
+ An optional dictionary to supplement the attrs passed to the
+ unit test's `rule()` constructor.
+ </p>
+ </td>
+ </tr>
<tr id="analysistest.make-config_settings">
<td><code>config_settings</code></td>
<td>
@@ -663,7 +673,7 @@ Recall that names of test rules must end in `_test`.
<tr id="unittest.make-attrs">
<td><code>attrs</code></td>
<td>
- optional. default is <code>None</code>
+ optional. default is <code>{}</code>
<p>
An optional dictionary to supplement the attrs passed to the
unit test's `rule()` constructor.
diff --git a/rules/analysis_test.bzl b/rules/analysis_test.bzl
index a43ef90..46d32dd 100644
--- a/rules/analysis_test.bzl
+++ b/rules/analysis_test.bzl
@@ -52,6 +52,5 @@ analysis_test = rule(
Args:
name: The name of the test rule.
- targets: A list of targets to ensure build.
- """,
+ targets: A list of targets to ensure build.""",
)
diff --git a/tests/analysis_test_test.sh b/tests/analysis_test_test.sh
index 5dc52b8..db9bbac 100755
--- a/tests/analysis_test_test.sh
+++ b/tests/analysis_test_test.sh
@@ -15,7 +15,7 @@
# limitations under the License.
#
# End to end tests for analysis_test.bzl.
-#
+#
# End to end tests of analysis_test.bzl cover verification that
# analysis_test tests fail when their underlying test targets fail analysis.
diff --git a/tests/unittest_test.sh b/tests/unittest_test.sh
index 5b9d43f..22239b5 100755
--- a/tests/unittest_test.sh
+++ b/tests/unittest_test.sh
@@ -15,7 +15,7 @@
# limitations under the License.
#
# End to end tests for unittest.bzl.
-#
+#
# Specifically, end to end tests of unittest.bzl cover verification that
# analysis-phase tests written with unittest.bzl appropriately
# cause test failures in cases where violated assertions are made.