mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-26 22:42:41 -08:00
Building / Fixed some tests
This commit is contained in:
parent
03d0f54083
commit
8b4fcf99a6
21 changed files with 221 additions and 188 deletions
|
|
@ -1,12 +1,9 @@
|
|||
import arc.util.*;
|
||||
import arc.util.io.*;
|
||||
import mindustry.content.*;
|
||||
import mindustry.game.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.io.*;
|
||||
import org.junit.jupiter.api.*;
|
||||
|
||||
import java.io.*;
|
||||
import java.nio.*;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
|
@ -50,9 +47,9 @@ public class IOTests{
|
|||
rules.attackMode = true;
|
||||
rules.buildSpeedMultiplier = 99f;
|
||||
|
||||
TypeIO.writeRules(buffer, rules);
|
||||
TypeIO.writeRules(new Writes(new ByteBufferOutput(buffer)), rules);
|
||||
buffer.position(0);
|
||||
Rules res = TypeIO.readRules(buffer);
|
||||
Rules res = TypeIO.readRules(new Reads(new ByteBufferInput(buffer)));
|
||||
|
||||
assertEquals(rules.buildSpeedMultiplier, res.buildSpeedMultiplier);
|
||||
assertEquals(rules.attackMode, res.attackMode);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue