mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-04-28 23:35:23 +00:00
changed Double values into Float values; wrote packet comments
This commit is contained in:
parent
729b36eba1
commit
17cfc1d626
2 changed files with 35 additions and 15 deletions
|
|
@ -26,11 +26,11 @@ class OxygenStateMessageTest extends Specification {
|
|||
PacketCoding.DecodePacket(string_vehicle).require match {
|
||||
case OxygenStateMessage(guid, time, active, veh_state) =>
|
||||
guid mustEqual PlanetSideGUID(75)
|
||||
time mustEqual 50.0
|
||||
time mustEqual 50.0f
|
||||
active mustEqual true
|
||||
veh_state.isDefined mustEqual true
|
||||
veh_state.get.vehicle_guid mustEqual PlanetSideGUID(1546)
|
||||
veh_state.get.time mustEqual 50.0
|
||||
veh_state.get.time mustEqual 50.0f
|
||||
veh_state.get.active mustEqual true
|
||||
case _ =>
|
||||
ko
|
||||
|
|
@ -38,14 +38,14 @@ class OxygenStateMessageTest extends Specification {
|
|||
}
|
||||
|
||||
"encode (self)" in {
|
||||
val msg = OxygenStateMessage(PlanetSideGUID(75), 50.0, true)
|
||||
val msg = OxygenStateMessage(PlanetSideGUID(75), 50.0f, true)
|
||||
val pkt = PacketCoding.EncodePacket(msg).require.toByteVector
|
||||
|
||||
pkt mustEqual string_self
|
||||
}
|
||||
|
||||
"encode (vehicle)" in {
|
||||
val msg = OxygenStateMessage(PlanetSideGUID(75), 50.0, true, WaterloggedVehicleState(PlanetSideGUID(1546), 50.0, true))
|
||||
val msg = OxygenStateMessage(PlanetSideGUID(75), 50.0f, true, WaterloggedVehicleState(PlanetSideGUID(1546), 50.0f, true))
|
||||
val pkt = PacketCoding.EncodePacket(msg).require.toByteVector
|
||||
|
||||
pkt mustEqual string_vehicle
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue