1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-10-31 21:52:59 +00:00

Remove compression from terminal/monitor packets

This commit is contained in:
Jonathan Coates
2023-08-23 09:57:50 +01:00
parent 8c8924f54e
commit f7411b40a2
2 changed files with 5 additions and 74 deletions

View File

@@ -18,22 +18,11 @@ import static org.junit.jupiter.api.Assertions.*;
*/
public class TerminalStateTest {
@RepeatedTest(5)
public void testCompressed() {
public void testRoundTrip() {
var terminal = randomTerminal();
var buffer = new FriendlyByteBuf(Unpooled.directBuffer());
new TerminalState(terminal, true).write(buffer);
checkEqual(terminal, read(buffer));
assertEquals(0, buffer.readableBytes());
}
@RepeatedTest(5)
public void testUncompressed() {
var terminal = randomTerminal();
var buffer = new FriendlyByteBuf(Unpooled.directBuffer());
new TerminalState(terminal, false).write(buffer);
new TerminalState(terminal).write(buffer);
checkEqual(terminal, read(buffer));
assertEquals(0, buffer.readableBytes());