Lines Matching refs:idx

182 	uint16_t idx;  in ZTEST()  local
185 ret = linear_range_get_index(&r[0], -10, &idx); in ZTEST()
187 zassert_equal(idx, 0U); in ZTEST()
189 ret = linear_range_get_index(&r[0], -7, &idx); in ZTEST()
191 zassert_equal(idx, 1U); in ZTEST()
194 ret = linear_range_get_index(&r[1], -1, &idx); in ZTEST()
196 zassert_equal(idx, 2U); in ZTEST()
198 ret = linear_range_get_index(&r[1], 2, &idx); in ZTEST()
200 zassert_equal(idx, 3U); in ZTEST()
203 ret = linear_range_get_index(&r[2], 100, &idx); in ZTEST()
205 zassert_equal(idx, 4U); in ZTEST()
207 ret = linear_range_get_index(&r[2], 280, &idx); in ZTEST()
209 zassert_equal(idx, 10U); in ZTEST()
212 ret = linear_range_get_index(&r[2], 120, &idx); in ZTEST()
214 zassert_equal(idx, 5U); in ZTEST()
217 ret = linear_range_get_index(&r[3], 400, &idx); in ZTEST()
219 zassert_equal(idx, 11U); in ZTEST()
222 ret = linear_range_group_get_index(r, r_cnt, -20, &idx); in ZTEST()
224 zassert_equal(idx, 0U); in ZTEST()
226 ret = linear_range_group_get_index(r, r_cnt, -6, &idx); in ZTEST()
228 zassert_equal(idx, 1U); in ZTEST()
230 ret = linear_range_group_get_index(r, r_cnt, 0, &idx); in ZTEST()
232 zassert_equal(idx, 2U); in ZTEST()
234 ret = linear_range_group_get_index(r, r_cnt, 50, &idx); in ZTEST()
236 zassert_equal(idx, 4U); in ZTEST()
238 ret = linear_range_group_get_index(r, r_cnt, 200, &idx); in ZTEST()
240 zassert_equal(idx, 8U); in ZTEST()
242 ret = linear_range_group_get_index(r, r_cnt, 400, &idx); in ZTEST()
244 zassert_equal(idx, 11U); in ZTEST()
250 uint16_t idx; in ZTEST() local
253 ret = linear_range_get_win_index(&r[0], -10, -6, &idx); in ZTEST()
255 zassert_equal(idx, 0U); in ZTEST()
257 ret = linear_range_get_win_index(&r[0], -7, -5, &idx); in ZTEST()
259 zassert_equal(idx, 1U); in ZTEST()
262 ret = linear_range_get_win_index(&r[0], -20, -15, &idx); in ZTEST()
265 ret = linear_range_get_win_index(&r[0], -4, -3, &idx); in ZTEST()
269 ret = linear_range_get_win_index(&r[1], -1, 0, &idx); in ZTEST()
271 zassert_equal(idx, 2U); in ZTEST()
273 ret = linear_range_get_win_index(&r[1], 1, 2, &idx); in ZTEST()
275 zassert_equal(idx, 3U); in ZTEST()
278 ret = linear_range_get_win_index(&r[2], 100, 100, &idx); in ZTEST()
280 zassert_equal(idx, 4U); in ZTEST()
283 ret = linear_range_get_win_index(&r[2], 100, 180, &idx); in ZTEST()
285 zassert_equal(idx, 4U); in ZTEST()
288 ret = linear_range_get_win_index(&r[2], 120, 140, &idx); in ZTEST()
290 zassert_equal(idx, 5U); in ZTEST()
293 ret = linear_range_get_win_index(&r[2], 120, 125, &idx); in ZTEST()
296 ret = linear_range_group_get_win_index(r, r_cnt, 120, 125, &idx); in ZTEST()
300 ret = linear_range_get_win_index(&r[3], 400, 400, &idx); in ZTEST()
302 zassert_equal(idx, 11U); in ZTEST()
305 ret = linear_range_group_get_win_index(r, r_cnt, -10, -8, &idx); in ZTEST()
307 zassert_equal(idx, 0U); in ZTEST()
309 ret = linear_range_group_get_win_index(r, r_cnt, 0, 1, &idx); in ZTEST()
311 zassert_equal(idx, 2U); in ZTEST()
313 ret = linear_range_group_get_win_index(r, r_cnt, 1, 120, &idx); in ZTEST()
315 zassert_equal(idx, 3U); in ZTEST()
317 ret = linear_range_group_get_win_index(r, r_cnt, 120, 140, &idx); in ZTEST()
319 zassert_equal(idx, 5U); in ZTEST()
321 ret = linear_range_group_get_win_index(r, r_cnt, 140, 400, &idx); in ZTEST()
323 zassert_equal(idx, 10U); in ZTEST()
325 ret = linear_range_group_get_win_index(r, r_cnt, 400, 400, &idx); in ZTEST()
327 zassert_equal(idx, 11U); in ZTEST()
329 ret = linear_range_group_get_win_index(r, r_cnt, 300, 310, &idx); in ZTEST()