Lines Matching refs:cases
66 additional tests cases which would test each property that an ``add`` function
164 We need many test cases covering all the unit's behaviors. It is common to have
167 *test suite*. A test suite is a collection of test cases for a unit of code
196 ``example_suite_init``, then run the test cases ``example_test_foo``,
229 not depend on physical hardware. Some of our test cases may not need hardware,
262 however, it is an easily derived concept. Accordingly, in most cases, every
499 In complicated cases, we recommend using a *table-driven test* compared to the
512 struct sha1_test_case cases[] = {
522 for (i = 0; i < ARRAY_SIZE(cases); ++i) {
523 sha1sum(cases[i].str, out);
524 KUNIT_EXPECT_STREQ_MSG(test, out, cases[i].sha1,
525 "sha1sum(%s)", cases[i].str);
535 * reduce duplication if test cases are shared across multiple tests.
538 field and reuse ``cases``.
548 By reusing the same ``cases`` array from above, we can write the test as a
558 const struct sha1_test_case cases[] = {
574 // Creates `sha1_gen_params()` to iterate over `cases`.
575 KUNIT_ARRAY_PARAM(sha1, cases, case_to_desc);
581 // The former `cases[i]` is accessible under test->param_value.
628 (in some cases) destructors in RAII languages.
709 In some cases, we need to call test-only code from outside the test file. This