Closed laurensslats closed 3 years ago
The examples of the Payload Codec Definitions are tested. Their input goes in the codec, and the output is compared with the defined output.
So, if the definition is:
And if the codec is:
Then it works.
Try changing one of the example input and output values locally and run make validate
, and you'll see it fails.
We can only test with example input and output. We cannot just test the codec script if we don't know what to test against. It is not required to define examples. We can consider making that mandatory.
Please reopen if I don't understand the issue raised.
Summary
Provide a way to test the encoder and decoder. AFAIK the encoder and decoder are not tested when running
make validate fmt
Why do we need this?
Guide people in the process
What is already there? What do you see now?
make validate fmt
What is missing? What do you want to see?
A process where people can test (and create) their encoders and decoders.
How do you propose to implement this?
Add some instructions.
Can you do this yourself and submit a Pull Request?
Probably yes, with some guidance from @johanstokking and/or @benolayinka