-
Notifications
You must be signed in to change notification settings - Fork 10
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
test: improve test cases #211
Conversation
Codecov ReportAttention: Patch coverage is
@@ Coverage Diff @@
## daan/api #211 +/- ##
============================================
- Coverage 34.08% 32.76% -1.33%
============================================
Files 34 34
Lines 3013 2994 -19
Branches 3013 2994 -19
============================================
- Hits 1027 981 -46
- Misses 1954 1980 +26
- Partials 32 33 +1
|
d4ab8cc
to
38c35e5
Compare
// - Represents the second level of nesting in `DOUBLE_NESTED_ERRORS`. | ||
// - Byte 3: | ||
// - Unused or represents further nested information. | ||
pub(super) fn handle_unknown_error(encoded_error: &mut [u8; 4]) { |
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.
Should we assign this to variables? Similar to extract_env
. Maybe
let (error_indx, error_type, ..double_nested_error) = encoded_error;
Or we can simply assign encoded_error[1..]
to one variable because it is used in multiple places
No longer needed due to #218 |
Refactors the the error handling in separate functions for easier testing between modules. The tests have also been refactored into separate tests for each error variant and more edge cases. More importantly, the tests don't test the
Error
from primitives but the raw bytes.In #192,
Error
is refactored to the pop api crate, note that the pop primitives crate is removed from the extension crate in this PR since here it was forgotten.In the second commit docs have been added to the
v0
module as well.Helping with #188