Lines Matching refs:cases
66 additional tests cases which would test each property that an ``add`` function
124 We need many test cases covering all the unit's behaviors. It is common to have
127 *test suite*. A test suite is a collection of test cases for a unit of code
151 ``example_suite_init``, then run the test cases ``example_test_foo``,
181 not depend on physical hardware. Some of our test cases may not need hardware,
214 however, it is an easily derived concept. Accordingly, in most cases, every
451 In complicated cases, we recommend using a *table-driven test* compared to the
464 struct sha1_test_case cases[] = {
474 for (i = 0; i < ARRAY_SIZE(cases); ++i) {
475 sha1sum(cases[i].str, out);
476 KUNIT_EXPECT_STREQ_MSG(test, out, cases[i].sha1,
477 "sha1sum(%s)", cases[i].str);
487 * reduce duplication if test cases are shared across multiple tests.
490 field and reuse ``cases``.
500 By reusing the same ``cases`` array from above, we can write the test as a
510 const struct sha1_test_case cases[] = {
526 // Creates `sha1_gen_params()` to iterate over `cases`.
527 KUNIT_ARRAY_PARAM(sha1, cases, case_to_desc);
533 // The former `cases[i]` is accessible under test->param_value.
553 execution. In some cases, it is unsafe to continue. We can use the
628 In some cases, we need to call test-only code from outside the test file.