-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactoring unit tests #15
Conversation
870e95a
to
284082d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Title of PR: "prober" -> "proper"?
I really like the test_utils approach, making the test case implementations much more concise, and easier to expand.
template <typename DocType> | ||
static EncodingResult encode(int (*encode_func)(exi_bitstream_t*, DocType*), const DocType& request, | ||
const uint8_t* compare_data, std::size_t length) { | ||
// FIXME (aw): what general size to take here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably expand this as soon as we encounter larger streams.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do the encode functions have a error code for "buffer too small"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do the encode functions have a error code for "buffer too small"?
Yes, EXI_ERROR__BITSTREAM_OVERFLOW
.
- Simplify tests & adding utility functions - Adding tests to test prober en- & decoding ISO20 bpt control mode - Fixing session setup res tests Signed-off-by: aw <[email protected]> Signed-off-by: Sebastian Lukas <[email protected]>
2ca3d2c
to
c8bf469
Compare
Describe your changes
Issue ticket number and link
In order not to lose the manually fixed things through a newly generated code, these tests are introduced here.
Checklist before requesting a review