Lines Matching full:cases
50 Test Cases
110 create additional tests cases which would each test a different property that an
178 many test cases covering all of a unit's behaviors. Consequently it is common
181 concept of a *test suite*. A *test suite* is just a collection of test cases
206 cases ``example_test_foo``, ``example_test_bar``, and ``example_test_baz``;
465 In such cases, it can be helpful to have a helper macro or function, e.g. this
487 In some cases, it can be helpful to write a *table-driven test* instead, e.g.
499 struct sha1_test_case cases[] = {
509 for (i = 0; i < ARRAY_SIZE(cases); ++i) {
510 sha1sum(cases[i].str, out);
511 KUNIT_EXPECT_STREQ_MSG(test, out, cases[i].sha1,
512 "sha1sum(%s)", cases[i].str);
521 * reduce duplication if test cases can be shared across multiple tests.
524 field and reuse ``cases``.
534 Reusing the same ``cases`` array from above, we can write the test as a
544 struct sha1_test_case cases[] = {
560 // Creates `sha1_gen_params()` to iterate over `cases`.
561 KUNIT_ARRAY_PARAM(sha1, cases, case_to_desc);
567 // The former `cases[i]` is accessible under test->param_value.
750 does not depend on physical hardware: if some of your test cases don't need the
756 hardware state in between test cases; if this is not possible, you may only be