-
Notifications
You must be signed in to change notification settings - Fork 0
Feat improve tests #18
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
Conversation
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.
Pull Request Overview
This PR adds getter methods for read timeout and minimum number of characters to read settings, refactors the timeout handling mechanism, and updates tests accordingly.
- Adds
getReadTimeout()andgetMinNumberCharRead()methods to retrieve current serial port configuration - Removes redundant
timeout_member variable and modifiessetTimeOut()to directly use the parameter value - Updates
setReadTimeout()to call the internalsetTimeOut()method for consistency - Comments out a previously failing test (
SetTermios2WithFail) and adds two new tests for the getter methods
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| include/libserial/serial.hpp | Adds public getter method declarations for read timeout and minimum character read settings; removes redundant timeout_ member variable documentation |
| src/serial.cpp | Implements the new getter methods; refactors setTimeOut() to remove member variable assignment; updates setReadTimeout() to call setTimeOut() |
| test/test_serial_pty.cpp | Comments out failing SetTermios2WithFail test; adds new tests for SetGetReadTimeout and SetGetMinNumberCharRead |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Summary
Changes
Details
How to test
Screenshots/Logs (optional)
Checklist
make cppcheck/make cpplint/make uncrustifyRisks and rollbacks