(gdb_arrow)
| 768 | |
| 769 | |
| 770 | def test_arrays_heap(gdb_arrow): |
| 771 | # Null |
| 772 | check_heap_repr( |
| 773 | gdb_arrow, "heap_null_array", |
| 774 | "arrow::NullArray of length 2, offset 0, null count 2") |
| 775 | |
| 776 | # Primitive |
| 777 | check_heap_repr( |
| 778 | gdb_arrow, "heap_int32_array", |
| 779 | ("arrow::Int32Array of length 4, offset 0, null count 1 = {" |
| 780 | "[0] = -5, [1] = 6, [2] = null, [3] = 42}")) |
| 781 | check_heap_repr( |
| 782 | gdb_arrow, "heap_int32_array_no_nulls", |
| 783 | ("arrow::Int32Array of length 4, offset 0, null count 0 = {" |
| 784 | "[0] = -5, [1] = 6, [2] = 3, [3] = 42}")) |
| 785 | check_heap_repr( |
| 786 | gdb_arrow, "heap_int32_array_sliced_1_9", |
| 787 | ("arrow::Int32Array of length 9, offset 1, unknown null count = {" |
| 788 | "[0] = 2, [1] = -3, [2] = 4, [3] = null, [4] = -5, [5] = 6, " |
| 789 | "[6] = -7, [7] = 8, [8] = null}")) |
| 790 | check_heap_repr( |
| 791 | gdb_arrow, "heap_int32_array_sliced_2_6", |
| 792 | ("arrow::Int32Array of length 6, offset 2, unknown null count = {" |
| 793 | "[0] = -3, [1] = 4, [2] = null, [3] = -5, [4] = 6, [5] = -7}")) |
| 794 | check_heap_repr( |
| 795 | gdb_arrow, "heap_int32_array_sliced_8_4", |
| 796 | ("arrow::Int32Array of length 4, offset 8, unknown null count = {" |
| 797 | "[0] = 8, [1] = null, [2] = -9, [3] = -10}")) |
| 798 | check_heap_repr( |
| 799 | gdb_arrow, "heap_int32_array_sliced_empty", |
| 800 | "arrow::Int32Array of length 0, offset 6, unknown null count") |
| 801 | |
| 802 | check_heap_repr( |
| 803 | gdb_arrow, "heap_double_array", |
| 804 | ("arrow::DoubleArray of length 2, offset 0, null count 1 = {" |
| 805 | "[0] = -1.5, [1] = null}")) |
| 806 | check_heap_repr( |
| 807 | gdb_arrow, "heap_float16_array", |
| 808 | ("arrow::HalfFloatArray of length 2, offset 0, null count 0 = {" |
| 809 | "[0] = 0.0, [1] = -1.5}")) |
| 810 | |
| 811 | # Boolean |
| 812 | check_heap_repr( |
| 813 | gdb_arrow, "heap_bool_array", |
| 814 | ("arrow::BooleanArray of length 18, offset 0, null count 6 = {" |
| 815 | "[0] = false, [1] = false, [2] = true, [3] = true, [4] = null, " |
| 816 | "[5] = null, [6] = false, [7] = false, [8] = true, [9] = true, " |
| 817 | "[10] = null, [11] = null, [12] = false, [13] = false, " |
| 818 | "[14] = true, [15] = true, [16] = null, [17] = null}")) |
| 819 | check_heap_repr( |
| 820 | gdb_arrow, "heap_bool_array_sliced_1_9", |
| 821 | ("arrow::BooleanArray of length 9, offset 1, unknown null count = {" |
| 822 | "[0] = false, [1] = true, [2] = true, [3] = null, [4] = null, " |
| 823 | "[5] = false, [6] = false, [7] = true, [8] = true}")) |
| 824 | check_heap_repr( |
| 825 | gdb_arrow, "heap_bool_array_sliced_2_6", |
| 826 | ("arrow::BooleanArray of length 6, offset 2, unknown null count = {" |
| 827 | "[0] = true, [1] = true, [2] = null, [3] = null, [4] = false, " |
nothing calls this directly
no test coverage detected