• Home
  • Raw
  • Download

Lines Matching +full:make +full:- +full:test

1 <!-- Generated with Stardoc: http://skydoc.bazel.build -->
23-name">name</a>, <a href="#unittest_toolchain-escape_chars_with">escape_chars_with</a>, <a href="#…
24 …<a href="#unittest_toolchain-join_on">join_on</a>, <a href="#unittest_toolchain-success_templ">suc…
33 | :------------- | :------------- | :------------- | :------------- | :------------- |
34 … id="unittest_toolchain-name"></a>name | A unique name for this target. | <a href="https://baze…
35-escape_chars_with"></a>escape_chars_with | Dictionary of characters that need escaping in test f…
36 | <a id="unittest_toolchain-escape_other_chars_with"></a>escape_other_chars_with | String to prefi…
37-failure_templ"></a>failure_templ | Test script template with a single `%s`. That placeholder is …
38 | <a id="unittest_toolchain-file_ext"></a>file_ext | File extension for test script, including lea…
39 | <a id="unittest_toolchain-join_on"></a>join_on | String used to join the lines in the failure me…
40 | <a id="unittest_toolchain-success_templ"></a>success_templ | Test script generated when the test
48 analysistest.begin(<a href="#analysistest.begin-ctx">ctx</a>)
51 Begins an analysis test.
53 This should be the first function called in an analysis test implementation
54 function. It initializes a "test environment" that is used to collect
56 test.
63 | :------------- | :------------- | :------------- |
64 | <a id="analysistest.begin-ctx"></a>ctx | The Starlark context. Pass the implementation function'…
68 A test environment struct that must be passed to assertions and finally to
78 analysistest.end(<a href="#analysistest.end-env">env</a>)
81 Ends an analysis test and logs the results.
83 This must be called and returned at the end of an analysis test implementation function so
91 | :------------- | :------------- | :------------- |
92 | <a id="analysistest.end-env"></a>env | The test environment returned by `analysistest.begin`. …
96 A list of providers needed to automatically register the analysis test result.
104 analysistest.fail(<a href="#analysistest.fail-env">env</a>, <a href="#analysistest.fail-msg">msg</a…
107 Unconditionally causes the current test to fail.
113 | :------------- | :------------- | :------------- |
114 | <a id="analysistest.fail-env"></a>env | The test environment returned by `unittest.begin`. | …
115 | <a id="analysistest.fail-msg"></a>msg | The message to log describing the failure. | none |
118 <a id="analysistest.make"></a>
120 ## analysistest.make
123make(<a href="#analysistest.make-impl">impl</a>, <a href="#analysistest.make-expect_failure">expec…
124 …<a href="#analysistest.make-extra_target_under_test_aspects">extra_target_under_test_aspects</a>, …
127 Creates an analysis test rule from its implementation function.
129 An analysis test verifies the behavior of a "real" rule target by examining
132 Each analysis test is defined in an implementation function that must then be
134 the boilerplate to create and return a test rule and captures the
135 implementation function's name so that it can be printed in test feedback.
137 An example of an analysis test:
147 your_test = analysistest.make(_your_test)
150 Recall that names of test rules must end in `_test`.
157 | :------------- | :------------- | :------------- |
158 | <a id="analysistest.make-impl"></a>impl | The implementation function of the unit test. | non…
159 | <a id="analysistest.make-expect_failure"></a>expect_failure | If true, the analysis test will ex…
160 | <a id="analysistest.make-attrs"></a>attrs | An optional dictionary to supplement the attrs passe…
161 …id="analysistest.make-fragments"></a>fragments | An optional list of fragment names that can be u…
162make-config_settings"></a>config_settings | A dictionary of configuration settings to change for …
163make-extra_target_under_test_aspects"></a>extra_target_under_test_aspects | An optional list of a…
164 | <a id="analysistest.make-doc"></a>doc | A description of the rule that can be extracted by docum…
177 analysistest.target_actions(<a href="#analysistest.target_actions-env">env</a>)
180 Returns a list of actions registered by the target under test.
186 | :------------- | :------------- | :------------- |
187 | <a id="analysistest.target_actions-env"></a>env | The test environment returned by `analysistest…
191 A list of actions registered by the target under test
199 analysistest.target_bin_dir_path(<a href="#analysistest.target_bin_dir_path-env">env</a>)
202 Returns ctx.bin_dir.path for the target under test.
208 | :------------- | :------------- | :------------- |
209 | <a id="analysistest.target_bin_dir_path-env"></a>env | The test environment returned by `analysi…
221 analysistest.target_under_test(<a href="#analysistest.target_under_test-env">env</a>)
224 Returns the target under test.
230 | :------------- | :------------- | :------------- |
231 | <a id="analysistest.target_under_test-env"></a>env | The test environment returned by `analysist…
235 The target under test.
243 …ts.equals-env">env</a>, <a href="#asserts.equals-expected">expected</a>, <a href="#asserts.equals-
252 | :------------- | :------------- | :------------- |
253 | <a id="asserts.equals-env"></a>env | The test environment returned by `unittest.begin`. | non…
254 | <a id="asserts.equals-expected"></a>expected | The expected value of some computation. | none…
255 | <a id="asserts.equals-actual"></a>actual | The actual value returned by some computation. | n…
256 | <a id="asserts.equals-msg"></a>msg | An optional message that will be printed that describes the…
264 …erts.expect_failure(<a href="#asserts.expect_failure-env">env</a>, <a href="#asserts.expect_failur…
267 Asserts that the target under test has failed with a given error message.
269 This requires that the analysis test is created with `analysistest.make()` and
277 | :------------- | :------------- | :------------- |
278 | <a id="asserts.expect_failure-env"></a>env | The test environment returned by `analysistest.begi…
279 | <a id="asserts.expect_failure-expected_failure_msg"></a>expected_failure_msg | The error message…
287 …ts.false(<a href="#asserts.false-env">env</a>, <a href="#asserts.false-condition">condition</a>, <…
296 | :------------- | :------------- | :------------- |
297 | <a id="asserts.false-env"></a>env | The test environment returned by `unittest.begin`. | none…
298 | <a id="asserts.false-condition"></a>condition | A value that will be evaluated in a Boolean cont…
299 | <a id="asserts.false-msg"></a>msg | An optional message that will be printed that describes the …
307-env">env</a>, <a href="#asserts.new_set_equals-expected">expected</a>, <a href="#asserts.new_set_…
316 | :------------- | :------------- | :------------- |
317 | <a id="asserts.new_set_equals-env"></a>env | The test environment returned by `unittest.begin`. …
318 | <a id="asserts.new_set_equals-expected"></a>expected | The expected set resulting from some comp…
319 | <a id="asserts.new_set_equals-actual"></a>actual | The actual set returned by some computation. …
320 | <a id="asserts.new_set_equals-msg"></a>msg | An optional message that will be printed that descr…
328 …als-env">env</a>, <a href="#asserts.set_equals-expected">expected</a>, <a href="#asserts.set_equal…
337 | :------------- | :------------- | :------------- |
338 | <a id="asserts.set_equals-env"></a>env | The test environment returned by `unittest.begin`. | …
339 | <a id="asserts.set_equals-expected"></a>expected | The expected set resulting from some computat…
340 | <a id="asserts.set_equals-actual"></a>actual | The actual set returned by some computation. | …
341 | <a id="asserts.set_equals-msg"></a>msg | An optional message that will be printed that describes…
349 …serts.true(<a href="#asserts.true-env">env</a>, <a href="#asserts.true-condition">condition</a>, <…
358 | :------------- | :------------- | :------------- |
359 | <a id="asserts.true-env"></a>env | The test environment returned by `unittest.begin`. | none |
360 | <a id="asserts.true-condition"></a>condition | A value that will be evaluated in a Boolean conte…
361 | <a id="asserts.true-msg"></a>msg | An optional message that will be printed that describes the f…
369-env">env</a>, <a href="#loadingtest.equals-test_case">test_case</a>, <a href="#loadingtest.equals
372 Creates a test case for asserting state at LOADING phase.
378 | :------------- | :------------- | :------------- |
379 | <a id="loadingtest.equals-env"></a>env | Loading test env created from loadingtest.make | non…
380 | <a id="loadingtest.equals-test_case"></a>test_case | Name of the test case | none |
381 | <a id="loadingtest.equals-expected"></a>expected | Expected value to test | none |
382 | <a id="loadingtest.equals-actual"></a>actual | Actual value received. | none |
386 None, creates test case
389 <a id="loadingtest.make"></a>
391 ## loadingtest.make
394 loadingtest.make(<a href="#loadingtest.make-name">name</a>)
397 Creates a loading phase test environment and test_suite.
403 | :------------- | :------------- | :------------- |
404 | <a id="loadingtest.make-name"></a>name | name of the suite of tests to create | none |
428 unittest.begin(<a href="#unittest.begin-ctx">ctx</a>)
431 Begins a unit test.
433 This should be the first function called in a unit test implementation
434 function. It initializes a "test environment" that is used to collect
436 test.
443 | :------------- | :------------- | :------------- |
444 | <a id="unittest.begin-ctx"></a>ctx | The Starlark context. Pass the implementation function's `c…
448 A test environment struct that must be passed to assertions and finally to
458 unittest.end(<a href="#unittest.end-env">env</a>)
461 Ends a unit test and logs the results.
463 This must be called and returned at the end of a unit test implementation function so
471 | :------------- | :------------- | :------------- |
472 | <a id="unittest.end-env"></a>env | The test environment returned by `unittest.begin`. | none |
476 A list of providers needed to automatically register the test result.
484 unittest.fail(<a href="#unittest.fail-env">env</a>, <a href="#unittest.fail-msg">msg</a>)
487 Unconditionally causes the current test to fail.
493 | :------------- | :------------- | :------------- |
494 | <a id="unittest.fail-env"></a>env | The test environment returned by `unittest.begin`. | none…
495 | <a id="unittest.fail-msg"></a>msg | The message to log describing the failure. | none |
498 <a id="unittest.make"></a>
500 ## unittest.make
503 …t.make(<a href="#unittest.make-impl">impl</a>, <a href="#unittest.make-attrs">attrs</a>, <a href="…
506 Creates a unit test rule from its implementation function.
508 Each unit test is defined in an implementation function that must then be
510 the boilerplate to create and return a test rule and captures the
511 implementation function's name so that it can be printed in test feedback.
514 test, in order to form unit tests of rules.
517 dependencies for this test.
519 An example of a unit test:
529 your_test = unittest.make(_your_test)
532 Recall that names of test rules must end in `_test`.
539 | :------------- | :------------- | :------------- |
540 | <a id="unittest.make-impl"></a>impl | The implementation function of the unit test. | none |
541 | <a id="unittest.make-attrs"></a>attrs | An optional dictionary to supplement the attrs passed to…
542 | <a id="unittest.make-doc"></a>doc | A description of the rule that can be extracted by documenta…
543 | <a id="unittest.make-toolchains"></a>toolchains | An optional list to supplement the toolchains …
556 unittest.suite(<a href="#unittest.suite-name">name</a>, <a href="#unittest.suite-test_rules">test_r…
561 After defining your test rules in a `.bzl` file, you need to create targets
562 from those rules so that `blaze test` can execute them. Doing this manually
563 in a BUILD file would consist of listing each test in your `load` statement
569 test_suite target. If a test rule requires no arguments, you can simply list
571 using `partial.make()`. For instance, in your `.bzl` file, you could write:
579 partial.make(yet_another_test, timeout = "short"),
591 If you pass _N_ unit test rules to `unittest.suite`, _N_ + 1 targets will be
594 is the index of the test in the `test_rules` list, which is used to uniquely
602 | :------------- | :------------- | :------------- |
603 | <a id="unittest.suite-name"></a>name | The name of the `test_suite` target, and the prefix of al…
604 | <a id="unittest.suite-test_rules"></a>test_rules | A list of test rules defines by `unittest.tes…