mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 11:49:04 +01:00
Unit tests for ConnectionWindowImpl.
This commit is contained in:
@@ -31,6 +31,7 @@ class ConnectionWindowImpl implements ConnectionWindow {
|
||||
public void setSeen(long connectionNumber) {
|
||||
int offset = getOffset(connectionNumber);
|
||||
int mask = 0x80000000 >>> offset;
|
||||
if((bitmap & mask) != 0) throw new IllegalArgumentException();
|
||||
bitmap |= mask;
|
||||
// If the new connection number is above the centre, slide the window
|
||||
if(connectionNumber >= centre) {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package net.sf.briar.transport;
|
||||
|
||||
import net.sf.briar.api.transport.ConnectionWindowFactory;
|
||||
import net.sf.briar.api.transport.PacketWriter;
|
||||
|
||||
import com.google.inject.AbstractModule;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user