mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-19 22:29:53 +01:00
BATCH_ID and MESSAGE_ID don't need to be structs.
This commit is contained in:
@@ -107,12 +107,10 @@ public class AckReaderTest extends TestCase {
|
||||
Random random = new Random();
|
||||
while(out.size() + BatchId.LENGTH + 3
|
||||
< ProtocolConstants.MAX_PACKET_LENGTH) {
|
||||
w.writeStructId(Types.BATCH_ID);
|
||||
random.nextBytes(b);
|
||||
w.writeBytes(b);
|
||||
}
|
||||
if(tooBig) {
|
||||
w.writeStructId(Types.BATCH_ID);
|
||||
random.nextBytes(b);
|
||||
w.writeBytes(b);
|
||||
}
|
||||
|
||||
@@ -52,9 +52,9 @@ public class ProtocolWriterImplTest extends TestCase {
|
||||
b.set(15);
|
||||
Request r = packetFactory.createRequest(b, 16);
|
||||
w.writeRequest(r);
|
||||
// Short user tag 8, 0 as uint7, short bytes with length 2, 0xD959
|
||||
// Short user tag 6, 0 as uint7, short bytes with length 2, 0xD959
|
||||
byte[] output = out.toByteArray();
|
||||
assertEquals("C8" + "00" + "92" + "D959",
|
||||
assertEquals("C6" + "00" + "92" + "D959",
|
||||
StringUtils.toHexString(output));
|
||||
}
|
||||
|
||||
@@ -75,9 +75,9 @@ public class ProtocolWriterImplTest extends TestCase {
|
||||
b.set(12);
|
||||
Request r = packetFactory.createRequest(b, 13);
|
||||
w.writeRequest(r);
|
||||
// Short user tag 8, 3 as uint7, short bytes with length 2, 0x59D8
|
||||
// Short user tag 6, 3 as uint7, short bytes with length 2, 0x59D8
|
||||
byte[] output = out.toByteArray();
|
||||
assertEquals("C8" + "03" + "92" + "59D8",
|
||||
assertEquals("C6" + "03" + "92" + "59D8",
|
||||
StringUtils.toHexString(output));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user