Add unit tests for frames.
This PR includes unit test for the different frame type. It covers test cases for initialization, encoding, decoding and flag setting.
This will increase the code coverage from 0% to 64%.
@AasthaGupta that is too early to add tests now. The API will be changed, so adding tests at this moment will just make it more challenging for us to break things when we find them less convenient.
At least, I would deffer mergin that until the internal implementation will be stabilized
@AasthaGupta that is too early to add tests now. The API will be changed, so adding tests at this moment will just make it more challenging for us to break things when we find them less convenient.
At least, I would deffer mergin that until the internal implementation will be stabilized
Frame logic can be tested imho, it shouldn't change that much anymore. I will add some convenience soon that builds on the existing logic.
@nkristek Right, the framing logic itself - true. Encoders - I would disagree. As we discussed, we can add more improvements to the existing codecs API. From my personal experience, writing tests for unstabilized API end ups in slowing down the whole development and research process. So when you have to rework the API or try out a new technique, apart from core changes you either have to maintain the tests or you usually comment/remove them entirely since they do not applicable or too hard to change them quickly. I'm fine if that great effort will be merged when we have the core part 90% implemented and stabilized and we know that what we have done unlikely to be changed.
Please, don't take me wrong, tests are inevitable, but I'm pessimistic about merging/doing that work now based on my experience.