Open snake-biscuits opened 1 year ago
Currently working on id_software.quake2.Visibility
as part of #112
valve_physics.Displacement
/ strata.strata.PhysicsDisplacement
shared.Entities
needs to test all known edge cases for regression
shared.PakFile
needs to confirm ZIP_DEFLATE
compression etc. (strict standard)
valve_physics.CollideLump
is broken, write xfail
tests for now
quake.MipTextureLump
needs bounds & size estimate checking (use a test map)
The rest are string-based, should be fairly simple to test
Each test should live in a class inside it's branch script's test file:
# tests/branches/id_software/test_quake.py
class TestMipTextureLump:
...
GameLumpClasses
counts GameLumpClasses
as SpecialLumpClasses
, we should as well
valve.source.GameLump_sprp.as_bytes()
fails to process model_names
correctly:
Since we'll want samples for automated testing, this ties into:
Also related:
NOTE: shouldn't introduce any new
GameLumpClasses
(onlyStaticPropClasses
), but we should be aware of it
Only 4 GameLump_SPRP
classes define .from_bytes
classmethod
s:
nexon.vindictus69.GameLump_SPRPv6
respawn.titanfall.GameLump_SPRPv12
respawn.titanfall2.GameLump_SPRPv13
valve.source.GameLump_SPRPv4
So we only really need to test those 4, the rest just set some common variables:
endianness
StaticPropClass
Forgot to write tests when all the
SpecialLumpClass
es got refactored in #68112 shows how big a mistake that was
.from_bytes()
->.as_bytes()
->.from_bytes
shouldn't mutate Some data loss is OK (comments inEntities
etc.), but we should strive towardsbyte-for-byte
__init__
should also create a valid objectSome test maps & in-game checks will be needed in places (will it load? crash?) Plenty of SpecialLumpClasses can be tested w/ tailored samples w/o a test map
SpecialLumpClasses
w/ enough testsid_software.quake.MipTextureLump
id_software.quake2.Visibility
id_software.quake3.Visibility
respawn.titanfall.EntityPartitions
shared.Entities
shared.PakFile
shared.TextureDataStringData
valve_physics.CollideLump
valve_physics.Displacement
strata.strata.PhysicsDisplacement
GameLumpClasses
w/ enough testsvalve.source.GameLump_SPRPv4
nexon.vindictus69.GameLump_SPRPv6
nexon.vinductus.GameLump_SPRPv6
nexon.vindictus.GameLump_SPRPv7
valve.source.GameLump_SPRPv5
valve.source.GameLump_SPRPv6
valve.source.GameLump_SPRPv7
valve.left4dead.GameLump_SPRPv8
valve.left4dead2.GameLump_SPRPv9
valve.sdk_2013_x360.GameLump_SPRPv9_x360
valve.sdk_2013_x360.GameLump_SPRPv8_x360
valve.orange_box.GameLump_SPRPv10
valve.sdk_2013.GameLump_SPRPv10
valve.sdk_2013.GameLump_SPRPv11
respawn.titanfall.GameLump_SPRPv12
respawn.titanfall_x360.GameLump_SPRPv12
respawn.titanfall2.GameLump_SPRPv13
strata.strata.GameLump_SPRPv12
strata.strata.GameLump_SPRPv13
utoplanet.merubasu.GameLump_SPRPv11
valve.sdk_2013_x360.GameLump_SPRPv11_x360
valve.sdk_2013_x360.GameLump_SPRPv10_x360
valve.orange_box_x360.GameLump_SPRPv6_x360
valve.orange_box_x360.GameLump_SPRPv5_x360
valve.orange_box_x360.GameLump_SPRPv4_x360