Lines Matching refs:array
278 uint8_t array[3] = {0}; in ZTEST() local
279 uint8_t *buf = array; in ZTEST()
283 zassert_equal(array[0], 1, "Unexpected value %d", array[0]); in ZTEST()
284 zassert_equal(array[1], 2, "Unexpected value %d", array[1]); in ZTEST()
285 zassert_equal(array[2], 3, "Unexpected value %d", array[2]); in ZTEST()
302 uint8_t array[] = { in ZTEST() local
316 size_t size = ARRAY_SIZE(array); in ZTEST()
319 zassert_equal(array[0], 1, "Unexpected value %d", array[0]); in ZTEST()
320 zassert_equal(array[1], 4, "Unexpected value %d", array[1]); in ZTEST()
321 zassert_equal(array[2], 9, "Unexpected value %d", array[2]); in ZTEST()
322 zassert_equal(array[3], 16, "Unexpected value %d", array[3]); in ZTEST()
323 zassert_equal(array[4], 25, "Unexpected value %d", array[4]); in ZTEST()
324 zassert_equal(array[5], 36, "Unexpected value %d", array[5]); in ZTEST()
325 zassert_equal(array[6], 255, "Unexpected value %d", array[6]); in ZTEST()
350 #define FOR_EACH_IDX_MACRO_TEST2(n, arg) array[n] = arg in ZTEST()
351 uint8_t array[32] = {0}; in ZTEST() local
356 zassert_equal(array[i], i + 1, in ZTEST()
357 "Unexpected value: %d", array[i]); in ZTEST()
359 zassert_equal(array[15], 0, "Unexpected value: %d", array[15]); in ZTEST()
494 size_t array[3]; in ZTEST() local
495 uint8_t *const alias = (uint8_t *)array; in ZTEST()
497 zassert_false(IS_ARRAY_ELEMENT(array, &array[-1])); in ZTEST()
498 zassert_false(IS_ARRAY_ELEMENT(array, &array[ARRAY_SIZE(array)])); in ZTEST()
499 zassert_false(IS_ARRAY_ELEMENT(array, &alias[1])); in ZTEST()
501 for (i = 0; i < ARRAY_SIZE(array); ++i) { in ZTEST()
502 zassert_true(IS_ARRAY_ELEMENT(array, &array[i])); in ZTEST()
509 size_t array[] = {0, 1, 2, 3}; in ZTEST() local
511 for (i = 0; i < ARRAY_SIZE(array); ++i) { in ZTEST()
512 zassert_equal(array[ARRAY_INDEX(array, &array[i])], i); in ZTEST()
519 size_t array[3]; in ZTEST() local
521 ARRAY_FOR_EACH(array, i) { in ZTEST()
525 zassert_equal(j, ARRAY_SIZE(array)); in ZTEST()
531 size_t array[3]; in ZTEST() local
534 ARRAY_FOR_EACH_PTR(array, p) { in ZTEST()
539 zassert_equal(ptr[0], &array[0]); in ZTEST()
540 zassert_equal(ptr[1], &array[1]); in ZTEST()
541 zassert_equal(ptr[2], &array[2]); in ZTEST()
547 size_t array[3]; in ZTEST() local
548 uint8_t *const alias = (uint8_t *)array; in ZTEST()
553 zassert_false(PART_OF_ARRAY(array, &array[-1])); in ZTEST()
554 zassert_false(PART_OF_ARRAY(array, &array[ARRAY_SIZE(array)])); in ZTEST()
556 for (i = 0; i < ARRAY_SIZE(array); ++i) { in ZTEST()
557 zassert_true(PART_OF_ARRAY(array, &array[i])); in ZTEST()
560 zassert_true(PART_OF_ARRAY(array, &alias[1])); in ZTEST()
566 size_t array[] = {0, 1, 2, 3}; in ZTEST() local
567 uint8_t *const alias = (uint8_t *)array; in ZTEST()
569 for (i = 0; i < ARRAY_SIZE(array); ++i) { in ZTEST()
570 zassert_equal(array[ARRAY_INDEX_FLOOR(array, &array[i])], i); in ZTEST()
573 zassert_equal(array[ARRAY_INDEX_FLOOR(array, &alias[1])], 0); in ZTEST()