public void testAscending() { // Test 32 byte arrays of ascending. byte[] ascending = new byte[32]; for (int i = 0; i < 32; i++) { ascending[i] = (byte) i; } assertCrc(0x46dd794e, ascending); }
public void testDescending() { // Test 32 byte arrays of descending. byte[] descending = new byte[32]; for (int i = 0; i < 32; i++) { descending[i] = (byte) (31 - i); } assertCrc(0x113fdb5c, descending); }
public void testScsiReadCommand() { // Test SCSI read command. byte[] scsiReadCommand = new byte[] { 0x01, (byte) 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x18, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; assertCrc(0xd9963a56, scsiReadCommand); }
public void testFull() { // Test 32 byte array of 0xFF. byte[] fulls = new byte[32]; Arrays.fill(fulls, (byte) 0xFF); assertCrc(0x62a8ab43, fulls); }
public void testZeros() { // Test 32 byte array of 0x00. byte[] zeros = new byte[32]; Arrays.fill(zeros, (byte) 0x00); assertCrc(0x8a9136aa, zeros); }
public void testAscending() { // Test 32 byte arrays of ascending. byte[] ascending = new byte[32]; for (int i = 0; i < 32; i++) { ascending[i] = (byte) i; } assertCrc(0x46dd794e, ascending); }
public void testDescending() { // Test 32 byte arrays of descending. byte[] descending = new byte[32]; for (int i = 0; i < 32; i++) { descending[i] = (byte) (31 - i); } assertCrc(0x113fdb5c, descending); }
public void testScsiReadCommand() { // Test SCSI read command. byte[] scsiReadCommand = new byte[] { 0x01, (byte) 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x18, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; assertCrc(0xd9963a56, scsiReadCommand); }
public void testZeros() { // Test 32 byte array of 0x00. byte[] zeros = new byte[32]; Arrays.fill(zeros, (byte) 0x00); assertCrc(0x8a9136aa, zeros); }
public void testFull() { // Test 32 byte array of 0xFF. byte[] fulls = new byte[32]; Arrays.fill(fulls, (byte) 0xFF); assertCrc(0x62a8ab43, fulls); }