Lines Matching +full:5 +full:- +full:10

3  * SPDX-License-Identifier: Apache-2.0
10 * +-----+-----+
12 * +-----+-----+
13 * | -10 | 0 |
14 * | -5 | 1 |
15 * +-----+-----+
18 * +-----+-----+
20 * | 130 | 5 |
25 * | 290 | 10 |
26 * +-----+-----+
29 * +-----+-----+
32 LINEAR_RANGE_INIT(-10, 5U, 0U, 1U),
34 LINEAR_RANGE_INIT(100, 30U, 4U, 10U),
42 zassert_equal(r[0].min, -10); in ZTEST()
43 zassert_equal(r[0].step, 5U); in ZTEST()
60 zassert_equal(linear_range_get_max_value(&r[0]), -5); in ZTEST()
73 zassert_equal(val, -10); in ZTEST()
77 zassert_equal(val, -5); in ZTEST()
91 ret = linear_range_get_value(&r[2], 5U, &val); in ZTEST()
111 ret = linear_range_get_value(&r[2], 10U, &val); in ZTEST()
124 zassert_equal(ret, -EINVAL); in ZTEST()
128 zassert_equal(val, -10); in ZTEST()
132 zassert_equal(val, -5); in ZTEST()
146 ret = linear_range_group_get_value(r, r_cnt, 5U, &val); in ZTEST()
166 ret = linear_range_group_get_value(r, r_cnt, 10U, &val); in ZTEST()
185 ret = linear_range_get_index(&r[0], -10, &idx); in ZTEST()
189 ret = linear_range_get_index(&r[0], -7, &idx); in ZTEST()
194 ret = linear_range_get_index(&r[1], -1, &idx); in ZTEST()
195 zassert_equal(ret, -ERANGE); in ZTEST()
199 zassert_equal(ret, -ERANGE); in ZTEST()
209 zassert_equal(idx, 10U); in ZTEST()
211 /* rounding: 120->130 (5) */ in ZTEST()
214 zassert_equal(idx, 5U); in ZTEST()
222 ret = linear_range_group_get_index(r, r_cnt, -20, &idx); in ZTEST()
223 zassert_equal(ret, -ERANGE); in ZTEST()
226 ret = linear_range_group_get_index(r, r_cnt, -6, &idx); in ZTEST()
235 zassert_equal(ret, -ERANGE); in ZTEST()
253 ret = linear_range_get_win_index(&r[0], -10, -6, &idx); in ZTEST()
257 ret = linear_range_get_win_index(&r[0], -7, -5, &idx); in ZTEST()
262 ret = linear_range_get_win_index(&r[0], -20, -15, &idx); in ZTEST()
263 zassert_equal(ret, -EINVAL); in ZTEST()
265 ret = linear_range_get_win_index(&r[0], -4, -3, &idx); in ZTEST()
266 zassert_equal(ret, -EINVAL); in ZTEST()
269 ret = linear_range_get_win_index(&r[1], -1, 0, &idx); in ZTEST()
270 zassert_equal(ret, -ERANGE); in ZTEST()
274 zassert_equal(ret, -ERANGE); in ZTEST()
287 /* rounding: 120->130, maximum < 130 */ in ZTEST()
290 zassert_equal(idx, 5U); in ZTEST()
292 /* rounding: 120->130, maximum > 125 (range too narrow) */ in ZTEST()
294 zassert_equal(ret, -EINVAL); in ZTEST()
297 zassert_equal(ret, -EINVAL); in ZTEST()
305 ret = linear_range_group_get_win_index(r, r_cnt, -10, -8, &idx); in ZTEST()
314 zassert_equal(ret, -ERANGE); in ZTEST()
319 zassert_equal(idx, 5U); in ZTEST()
322 zassert_equal(ret, -ERANGE); in ZTEST()
323 zassert_equal(idx, 10U); in ZTEST()
330 zassert_equal(ret, -EINVAL); in ZTEST()