Lines Matching refs:ret
68 int ret; in ZTEST() local
71 ret = linear_range_get_value(&r[0], 0U, &val); in ZTEST()
72 zassert_equal(ret, 0); in ZTEST()
75 ret = linear_range_get_value(&r[0], 1U, &val); in ZTEST()
76 zassert_equal(ret, 0); in ZTEST()
79 ret = linear_range_get_value(&r[1], 2U, &val); in ZTEST()
80 zassert_equal(ret, 0); in ZTEST()
83 ret = linear_range_get_value(&r[1], 3U, &val); in ZTEST()
84 zassert_equal(ret, 0); in ZTEST()
87 ret = linear_range_get_value(&r[2], 4U, &val); in ZTEST()
88 zassert_equal(ret, 0); in ZTEST()
91 ret = linear_range_get_value(&r[2], 5U, &val); in ZTEST()
92 zassert_equal(ret, 0); in ZTEST()
95 ret = linear_range_get_value(&r[2], 6U, &val); in ZTEST()
96 zassert_equal(ret, 0); in ZTEST()
99 ret = linear_range_get_value(&r[2], 7U, &val); in ZTEST()
100 zassert_equal(ret, 0); in ZTEST()
103 ret = linear_range_get_value(&r[2], 8U, &val); in ZTEST()
104 zassert_equal(ret, 0); in ZTEST()
107 ret = linear_range_get_value(&r[2], 9U, &val); in ZTEST()
108 zassert_equal(ret, 0); in ZTEST()
111 ret = linear_range_get_value(&r[2], 10U, &val); in ZTEST()
112 zassert_equal(ret, 0); in ZTEST()
115 ret = linear_range_get_value(&r[3], 11U, &val); in ZTEST()
116 zassert_equal(ret, 0); in ZTEST()
119 ret = linear_range_get_value(&r[3], 12U, &val); in ZTEST()
120 zassert_equal(ret, 0); in ZTEST()
123 ret = linear_range_get_value(&r[1], 13U, &val); in ZTEST()
124 zassert_equal(ret, -EINVAL); in ZTEST()
126 ret = linear_range_group_get_value(r, r_cnt, 0U, &val); in ZTEST()
127 zassert_equal(ret, 0); in ZTEST()
130 ret = linear_range_group_get_value(r, r_cnt, 1U, &val); in ZTEST()
131 zassert_equal(ret, 0); in ZTEST()
134 ret = linear_range_group_get_value(r, r_cnt, 2U, &val); in ZTEST()
135 zassert_equal(ret, 0); in ZTEST()
138 ret = linear_range_group_get_value(r, r_cnt, 3U, &val); in ZTEST()
139 zassert_equal(ret, 0); in ZTEST()
142 ret = linear_range_group_get_value(r, r_cnt, 4U, &val); in ZTEST()
143 zassert_equal(ret, 0); in ZTEST()
146 ret = linear_range_group_get_value(r, r_cnt, 5U, &val); in ZTEST()
147 zassert_equal(ret, 0); in ZTEST()
150 ret = linear_range_group_get_value(r, r_cnt, 6U, &val); in ZTEST()
151 zassert_equal(ret, 0); in ZTEST()
154 ret = linear_range_group_get_value(r, r_cnt, 7U, &val); in ZTEST()
155 zassert_equal(ret, 0); in ZTEST()
158 ret = linear_range_group_get_value(r, r_cnt, 8U, &val); in ZTEST()
159 zassert_equal(ret, 0); in ZTEST()
162 ret = linear_range_group_get_value(r, r_cnt, 9U, &val); in ZTEST()
163 zassert_equal(ret, 0); in ZTEST()
166 ret = linear_range_group_get_value(r, r_cnt, 10U, &val); in ZTEST()
167 zassert_equal(ret, 0); in ZTEST()
170 ret = linear_range_group_get_value(r, r_cnt, 11U, &val); in ZTEST()
171 zassert_equal(ret, 0); in ZTEST()
174 ret = linear_range_group_get_value(r, r_cnt, 12U, &val); in ZTEST()
175 zassert_equal(ret, 0); in ZTEST()
181 int ret; in ZTEST() local
185 ret = linear_range_get_index(&r[0], -10, &idx); in ZTEST()
186 zassert_equal(ret, 0); in ZTEST()
189 ret = linear_range_get_index(&r[0], -7, &idx); in ZTEST()
190 zassert_equal(ret, 0); in ZTEST()
194 ret = linear_range_get_index(&r[1], -1, &idx); in ZTEST()
195 zassert_equal(ret, -ERANGE); in ZTEST()
198 ret = linear_range_get_index(&r[1], 2, &idx); in ZTEST()
199 zassert_equal(ret, -ERANGE); in ZTEST()
203 ret = linear_range_get_index(&r[2], 100, &idx); in ZTEST()
204 zassert_equal(ret, 0); in ZTEST()
207 ret = linear_range_get_index(&r[2], 280, &idx); in ZTEST()
208 zassert_equal(ret, 0); in ZTEST()
212 ret = linear_range_get_index(&r[2], 120, &idx); in ZTEST()
213 zassert_equal(ret, 0); in ZTEST()
217 ret = linear_range_get_index(&r[3], 400, &idx); in ZTEST()
218 zassert_equal(ret, 0); 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()
227 zassert_equal(ret, 0); in ZTEST()
230 ret = linear_range_group_get_index(r, r_cnt, 0, &idx); in ZTEST()
231 zassert_equal(ret, 0); in ZTEST()
234 ret = linear_range_group_get_index(r, r_cnt, 50, &idx); in ZTEST()
235 zassert_equal(ret, -ERANGE); in ZTEST()
238 ret = linear_range_group_get_index(r, r_cnt, 200, &idx); in ZTEST()
239 zassert_equal(ret, 0); in ZTEST()
242 ret = linear_range_group_get_index(r, r_cnt, 400, &idx); in ZTEST()
243 zassert_equal(ret, 0); in ZTEST()
249 int ret; in ZTEST() local
253 ret = linear_range_get_win_index(&r[0], -10, -6, &idx); in ZTEST()
254 zassert_equal(ret, 0); in ZTEST()
257 ret = linear_range_get_win_index(&r[0], -7, -5, &idx); in ZTEST()
258 zassert_equal(ret, 0); 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()
273 ret = linear_range_get_win_index(&r[1], 1, 2, &idx); in ZTEST()
274 zassert_equal(ret, -ERANGE); in ZTEST()
278 ret = linear_range_get_win_index(&r[2], 100, 100, &idx); in ZTEST()
279 zassert_equal(ret, 0); in ZTEST()
283 ret = linear_range_get_win_index(&r[2], 100, 180, &idx); in ZTEST()
284 zassert_equal(ret, 0); in ZTEST()
288 ret = linear_range_get_win_index(&r[2], 120, 140, &idx); in ZTEST()
289 zassert_equal(ret, 0); in ZTEST()
293 ret = linear_range_get_win_index(&r[2], 120, 125, &idx); in ZTEST()
294 zassert_equal(ret, -EINVAL); in ZTEST()
296 ret = linear_range_group_get_win_index(r, r_cnt, 120, 125, &idx); in ZTEST()
297 zassert_equal(ret, -EINVAL); in ZTEST()
300 ret = linear_range_get_win_index(&r[3], 400, 400, &idx); in ZTEST()
301 zassert_equal(ret, 0); in ZTEST()
305 ret = linear_range_group_get_win_index(r, r_cnt, -10, -8, &idx); in ZTEST()
306 zassert_equal(ret, 0); in ZTEST()
309 ret = linear_range_group_get_win_index(r, r_cnt, 0, 1, &idx); in ZTEST()
310 zassert_equal(ret, 0); in ZTEST()
313 ret = linear_range_group_get_win_index(r, r_cnt, 1, 120, &idx); in ZTEST()
314 zassert_equal(ret, -ERANGE); in ZTEST()
317 ret = linear_range_group_get_win_index(r, r_cnt, 120, 140, &idx); in ZTEST()
318 zassert_equal(ret, 0); in ZTEST()
321 ret = linear_range_group_get_win_index(r, r_cnt, 140, 400, &idx); in ZTEST()
322 zassert_equal(ret, -ERANGE); in ZTEST()
325 ret = linear_range_group_get_win_index(r, r_cnt, 400, 400, &idx); in ZTEST()
326 zassert_equal(ret, 0); in ZTEST()
329 ret = linear_range_group_get_win_index(r, r_cnt, 300, 310, &idx); in ZTEST()
330 zassert_equal(ret, -EINVAL); in ZTEST()