Lines Matching +full:pre +full:- +full:declared
4 * SPDX-License-Identifier: Apache-2.0
17 #define BIT_INDEX(bit) ((3 - ((bit >> 3) & 0x3)) + 4*(bit >> 5))
61 zassert_equal(ba->num_bits, num_bits, in validate_bitarray_define()
63 num_bits, ba->num_bits); in validate_bitarray_define()
65 zassert_equal(ba->num_bundles, num_bundles, in validate_bitarray_define()
67 num_bundles, ba->num_bundles); in validate_bitarray_define()
70 zassert_equal(ba->bundles[i], FREE, in validate_bitarray_define()
92 * in the declared array are set as free to represent the number of bits in ZTEST()
109 for (i = 0; i < ba->num_bundles; i++) { in bitarray_bundles_is_zero()
110 if (ba->bundles[i] != 0) { in bitarray_bundles_is_zero()
252 ret = sys_bitarray_set_bit(&ba, -1); in ZTEST()
257 ret = sys_bitarray_clear_bit(&ba, -1); in ZTEST()
262 ret = sys_bitarray_test_bit(&ba, -1, &bit_val); in ZTEST()
267 ret = sys_bitarray_test_and_set_bit(&ba, -1, &bit_val); in ZTEST()
273 ret = sys_bitarray_test_and_clear_bit(&ba, -1, &bit_val); in ZTEST()
291 /* Pre-populate the bits */ in alloc_and_free_predefined()
340 /* test in-between bundles */ in alloc_and_free_predefined()
367 val = val & (val - 1); in count_bits()
379 for (idx = 0; idx < ba->num_bundles; idx++) { in get_bitarray_popcnt()
380 popcnt += count_bits(ba->bundles[idx]); in get_bitarray_popcnt()
406 num_bits = (ba.num_bits - bit) / divisor; in alloc_and_free_loop()
430 ret = sys_bitarray_free(&ba, (num_bits - 1), (bit + 1)); in alloc_and_free_loop()
431 if ((num_bits == 0) || ((num_bits - 1) == 0)) { in alloc_and_free_loop()
440 expected_popcnt -= num_bits - 1; in alloc_and_free_loop()
458 /* Pre-populate the bits so that 4-bit already allocated, in alloc_and_free_interval()
537 /* Pre-populate the bits */ in ZTEST()
570 /* Pre-populate the bits. in ZTEST()
604 zassert_equal(ret, -EINVAL, "sys_bitarray_popcount_region() returned unexpected value: %d", in ZTEST()
607 zassert_equal(ret, -EINVAL, "sys_bitarray_popcount_region() returned unexpected value: %d", in ZTEST()
613 zassert_equal(ret, -EINVAL, "sys_bitarray_popcount_region() returned unexpected value: %d", in ZTEST()
616 zassert_equal(ret, -EINVAL, "sys_bitarray_popcount_region() returned unexpected value: %d", in ZTEST()
635 /* Pre-populate the bits */ in ZTEST()
668 /* Pre-populate the bits */ in ZTEST()
686 /* Pre-populate the bits */ in ZTEST()
706 /* Pre-populate the bits */ in ZTEST()
717 ret = sys_bitarray_xor(&ba, &bb, 32*3 - 2, 32 + 1); in ZTEST()
729 /* Pre-populate the bits */ in ZTEST()
749 zassert_equal(ret, -EINVAL, "sys_bitarray_xor() returned unexpected value: %d", ret); in ZTEST()
751 zassert_equal(ret, -EINVAL, "sys_bitarray_xor() returned unexpected value: %d", ret); in ZTEST()
756 zassert_equal(ret, -EINVAL, "sys_bitarray_xor() returned unexpected value: %d", ret); in ZTEST()
758 zassert_equal(ret, -EINVAL, "sys_bitarray_xor() returned unexpected value: %d", ret); in ZTEST()
760 zassert_equal(ret, -EINVAL, "sys_bitarray_xor() returned unexpected value: %d", ret); in ZTEST()
777 /* Pre-populate the bits */ in ZTEST()
819 zassert_equal(ret, -EINVAL, "sys_bitarray_find_nth_set() returned unexpected value: %d", in ZTEST()
858 zassert_equal(ret, -EINVAL, "sys_bitarray_find_nth_set() returned unexpected value: %d", in ZTEST()
862 zassert_equal(ret, -EINVAL, "sys_bitarray_find_nth_set() returned unexpected value: %d", in ZTEST()
866 zassert_equal(ret, -EINVAL, "sys_bitarray_find_nth_set() returned unexpected value: %d", in ZTEST()
885 /* Pre-populate the bits */ in ZTEST()
923 /* Pre-populate the bits */ in ZTEST()
963 zassert_equal(ret, -EINVAL, "sys_bitarray_set_region() should fail but not"); in ZTEST()
968 zassert_equal(ret, -EINVAL, "sys_bitarray_set_region() should fail but not"); in ZTEST()
973 zassert_equal(ret, -EINVAL, "sys_bitarray_clear_region() should fail but not"); in ZTEST()
978 zassert_equal(ret, -EINVAL, "sys_bitarray_clear_region() should fail but not"); in ZTEST()
984 /* Pre-populate the bits */ in ZTEST()
1049 /* boundary test, input is max - 1 */ in ZTEST()