Lines Matching +full:use +full:- +full:cases
1 // SPDX-License-Identifier: GPL-2.0
3 * Example KUnit test to show how to use KUnit.
55 * This is run once before all test cases in the suite.
66 * This is run once after all test cases in the suite.
150 KUNIT_EXPECT_GT_MSG(test, sizeof(int), 0, "Your ints are 0-bit?!"); in example_all_expect_macros_test()
151 KUNIT_ASSERT_GT_MSG(test, sizeof(int), 0, "Your ints are 0-bit?!"); in example_all_expect_macros_test()
168 return i - 1; in subtract_one()
172 * This test shows the use of static stubs.
200 snprintf(desc, KUNIT_PARAM_DESC_SIZE, "example value %d", p->value); in example_param_get_desc()
206 * This test shows the use of params.
210 const struct example_param *param = test->param_value; in example_params_test()
216 if (!param->value) in example_params_test()
219 /* You can use param values for parameterized testing */ in example_params_test()
220 KUNIT_EXPECT_EQ(test, param->value % param->value, 0); in example_params_test()
232 * Here we make a list of all the test cases we want to add to the test suite
239 * use KUnit, just know that this is how you associate test cases with a
255 * Test cases are defined as belonging to the suite by adding them to