Lines Matching full:cases
6 Test 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[] = {
569 // Creates `sha1_gen_params()` to iterate over `cases` while using
571 KUNIT_ARRAY_PARAM_DESC(sha1, cases, str);
577 // The former `cases[i]` is accessible under test->param_value.
624 (in some cases) destructors in RAII languages.
724 In some cases, we need to call test-only code from outside the test file. This
816 require a ``struct device`` or ``struct device_driver``. In many cases, setting
838 instead of ``platform_device_register()`` in cases where the device is not otherwise