    @TestTargetNew(
        level = TestLevel.PARTIAL_COMPLETE,
        notes = "",
        method = "setIntArray",
        args = {}

    )
    public void testSetIntArray() {
        IMemorySystem memory = Platform.getMemorySystem();
        
        int[] values = { 3, 7, 31, 127, 8191, 131071, 524287, 2147483647 };
        int[] swappedValues = new int[values.length];
        for (int i = 0; i < values.length; ++i) {
            swappedValues[i] = swapInt(values[i]);
        }
        
        int scale = ICommonDataTypes.SIZEOF_JINT;
        int ptr = memory.malloc(scale * values.length);
        try {
            // Regular copy. Memset first so we start from a known state.
            memory.memset(ptr, (byte) 0, scale * values.length);
            memory.setIntArray(ptr, values, 0, values.length, false);
            assertIntsEqual(values, ptr);
            
            // Swapped copy.
            memory.memset(ptr, (byte) 0, scale * values.length);
            memory.setIntArray(ptr, values, 0, values.length, true);
            assertIntsEqual(swappedValues, ptr);
            
            // Swapped copies of slices (to ensure we test non-zero offsets).
            memory.memset(ptr, (byte) 0, scale * values.length);
            for (int i = 0; i < values.length; ++i) {
                memory.setIntArray(ptr + i * scale, values, i, 1, true);
            }
            assertIntsEqual(swappedValues, ptr);
        } finally {
            memory.free(ptr);
        }
    }