mirror of
https://github.com/psforever/PSF-LoginServer.git
synced 2026-03-03 20:40:24 +00:00
27 lines
541 B
Scala
27 lines
541 B
Scala
// Copyright (c) 2017 PSForever
|
|
package game
|
|
|
|
import org.specs2.mutable._
|
|
import net.psforever.packet._
|
|
import net.psforever.packet.game._
|
|
import scodec.bits._
|
|
|
|
class VoiceHostKillTest extends Specification {
|
|
val string_kill = hex"b1"
|
|
|
|
"decode" in {
|
|
PacketCoding.DecodePacket(string_kill).require match {
|
|
case VoiceHostKill() =>
|
|
ok
|
|
case _ =>
|
|
ko
|
|
}
|
|
}
|
|
|
|
"encode" in {
|
|
val msg = VoiceHostKill()
|
|
val pkt = PacketCoding.EncodePacket(msg).require.toByteVector
|
|
|
|
pkt mustEqual string_kill
|
|
}
|
|
}
|