1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-11-02 09:17:19 -04:00

fixed stream-writer's test bug

This commit is contained in:
M. Sz 2021-02-01 20:56:23 +01:00
parent 84c87b2eb8
commit 2ebb36eba8

View File

@ -8,14 +8,12 @@ func TestStreamWriterByte(t *testing.T) {
sr := CreateStreamWriter() sr := CreateStreamWriter()
data := []byte{0x12, 0x34, 0x56, 0x78} data := []byte{0x12, 0x34, 0x56, 0x78}
for _, d := range data { sr.PushBytes(data...)
sr.PushByte(d)
}
output := sr.GetBytes() output := sr.GetBytes()
for i, d := range data { for i, d := range data {
if output[i] != d { if output[i] != d {
t.Fatalf("sr.PushByte() pushed %X, but wrote %X instead", d, output[i]) t.Fatalf("sr.PushBytes() pushed %X, but wrote %X instead", d, output[i])
} }
} }
} }