I would like a spec for every clientbound packet we have that tests that we can properly read, then write -- then check that the original packet matches the written data
This will prove that we are at minimum parsing all of the data because we wouldn't be able to write it without first parsing properly
It's probably ideal to have all of these specs located in their own files, as this will allow us to add additional specs with minimal effort. Such as callback specs
Alternatively... we could have 1 serialization spec that simply parses all of the packets as found in spec/fixtures/packets/clientbound/
You can read how to capture packets here: https://github.com/RosegoldMC/rosegold.cr/wiki/How-to-capture-packet-for-fixtures
I would like a spec for every clientbound packet we have that tests that we can properly read, then write -- then check that the original packet matches the written data
I do this with NBT, this is probably SUPER helpful: https://github.com/RosegoldMC/rosegold.cr/blob/main/spec/minecraft/nbt_spec.cr#L22
This will prove that we are at minimum parsing all of the data because we wouldn't be able to write it without first parsing properly
It's probably ideal to have all of these specs located in their own files, as this will allow us to add additional specs with minimal effort. Such as callback specs
Alternatively... we could have 1 serialization spec that simply parses all of the packets as found in spec/fixtures/packets/clientbound/