public void test_AllocationPadded_copy1DRangeToUnchecked_Byte3() { Random random = new Random(0x172d8ab9); int width = random.nextInt(512); int arr_len = width * 3; byte[] inArray = new byte[arr_len]; byte[] outArray = new byte[arr_len]; random.nextBytes(inArray); Type.Builder typeBuilder = new Type.Builder(mRS, Element.I8_3(mRS)); typeBuilder.setX(width); Allocation alloc = Allocation.createTyped(mRS, typeBuilder.create()); alloc.setAutoPadding(true); int offset = random.nextInt(width); int count = width - offset; alloc.copy1DRangeFrom(offset, count, inArray); alloc.copy1DRangeToUnchecked(offset, count, outArray); boolean result = true; for (int i = 0; i < count * 3; i++) { if (inArray[i] != outArray[i]) { result = false; break; } } for (int i = count * 3; i < arr_len; i++) { if (outArray[i] != 0) { result = false; break; } } assertTrue( "test_copy1DRangeToUnchecked_Padded_Byte Failed, output array does not match input", result); }