|
11 | 11 | import de.rub.nds.tlsattacker.modifiablevariable.biginteger.ModifiableBigInteger; |
12 | 12 | import de.rub.nds.tlsattacker.modifiablevariable.bytearray.ModifiableByteArray; |
13 | 13 | import de.rub.nds.tlsattacker.modifiablevariable.integer.ModifiableInteger; |
| 14 | +import de.rub.nds.tlsattacker.modifiablevariable.singlebyte.ModifiableByte; |
| 15 | +import de.rub.nds.tlsattacker.modifiablevariable.mlong.ModifiableLong; |
14 | 16 | import de.rub.nds.tlsattacker.util.ArrayConverter; |
15 | 17 | import java.math.BigInteger; |
16 | 18 | import org.apache.logging.log4j.LogManager; |
@@ -51,4 +53,22 @@ public void testRandomByteArrayModification() throws Exception { |
51 | 53 | LOGGER.info("Randomly modified byte array: " + ArrayConverter.bytesToHexString(array.getValue())); |
52 | 54 | assertNotNull(array.getModification()); |
53 | 55 | } |
| 56 | + |
| 57 | + @Test |
| 58 | + public void testRandomSingleByteModification() throws Exception { |
| 59 | + ModifiableByte singleByte = ModifiableVariableFactory.createByteModifiableVariable(); |
| 60 | + singleByte.setOriginalValue((byte)0); |
| 61 | + singleByte.createRandomModificationAtRuntime(); |
| 62 | + LOGGER.info("Randomly modified byte: " + ArrayConverter.bytesToHexString(new byte[] { singleByte.getValue() })); |
| 63 | + assertNotNull(singleByte.getModification()); |
| 64 | + } |
| 65 | + |
| 66 | + @Test |
| 67 | + public void testRandomLongModification() throws Exception { |
| 68 | + ModifiableLong modLong = ModifiableVariableFactory.createLongModifiableVariable(); |
| 69 | + modLong.setOriginalValue(new Long(0)); |
| 70 | + modLong.createRandomModificationAtRuntime(); |
| 71 | + LOGGER.info("Randomly modified Long: " + modLong.getValue()); |
| 72 | + assertNotNull(modLong.getModification()); |
| 73 | + } |
54 | 74 | } |
0 commit comments