Skip to content

Decoder improvements #21

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

Merged
merged 4 commits into from
Apr 18, 2025
Merged

Decoder improvements #21

merged 4 commits into from
Apr 18, 2025

Conversation

pdgendt
Copy link
Owner

@pdgendt pdgendt commented Apr 18, 2025

  • Add a NeedsMoreData method to the decoder to check for incomplete frames.
  • Add more test cases for decoder.

pdgendt added 4 commits April 18, 2025 18:37
Add an error type and a function to check if a decoder still needs data
for a complete frame.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
With the introduction of NeedsMoreData we should verify decoder states
in the current tests.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
A simple test case for some frames that are missing data.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Add some simple tests for encountering unexpected delimiters.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Copy link

codecov bot commented Apr 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.05%. Comparing base (95ca063) to head (89a1875).
Report is 4 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #21      +/-   ##
==========================================
+ Coverage   93.75%   97.05%   +3.30%     
==========================================
  Files           1        1              
  Lines          96      102       +6     
==========================================
+ Hits           90       99       +9     
+ Misses          4        2       -2     
+ Partials        2        1       -1     
Files with missing lines Coverage Δ
cobs.go 97.05% <100.00%> (+3.30%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pdgendt pdgendt merged commit 078b489 into main Apr 18, 2025
9 checks passed
@pdgendt pdgendt deleted the decoder-tests branch April 18, 2025 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant