Skip to content
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

Add unit tests for StreamPeerTCP #102064

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wheatear-dev
Copy link
Contributor

Adds unit tests for StreamPeerTCP, using a mock implementation of NetSocket (#43440).

Includes:

  • Boundary testing of port bindings
  • State transitions (e.g. receiving a FIN message)
  • Streaming ascii-encoded data on:
    • StreamPeerTCP::put_data()
    • StreamPeerTCP::get_data()

Several public methods on StreamPeerTCP are tested, but more remain untested - this can be addressed in later PR's if required.

I particularly welcome suggestions for the manual memory management in the latter few sub-cases - this feels like an anti-pattern.

Thanks! 😌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants