Lines Matching +full:semi +full:- +full:static
1 // SPDX-License-Identifier: GPL-2.0
15 static const struct rational_test_param test_parameters[] = {
16 { 1230, 10, 100, 20, 100, 1, "Exceeds bounds, semi-convergent term > 1/2 last term" },
17 { 34567,100, 120, 20, 120, 1, "Exceeds bounds, semi-convergent term < 1/2 last term" },
19 { 1, 19, 100, 10, 1, 10, "Closest to smallest non-zero" },
26 static void get_desc(const struct rational_test_param *param, char *desc) in get_desc()
28 strscpy(desc, param->name, KUNIT_PARAM_DESC_SIZE); in get_desc()
34 static void rational_test(struct kunit *test) in rational_test()
36 const struct rational_test_param *param = (const struct rational_test_param *)test->param_value; in rational_test()
39 rational_best_approximation(param->num, param->den, param->max_num, param->max_den, &n, &d); in rational_test()
40 KUNIT_EXPECT_EQ(test, n, param->exp_num); in rational_test()
41 KUNIT_EXPECT_EQ(test, d, param->exp_den); in rational_test()
44 static struct kunit_case rational_test_cases[] = {
49 static struct kunit_suite rational_test_suite = {