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

Remove unnecessary code duplication in socket_connect tests #132

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

dbechrd
Copy link
Contributor

@dbechrd dbechrd commented Sep 18, 2024

All 8 of these tests do exactly the same thing, with various combinations of addresses. With a helper function, you can test everything with ~400 less lines of code, and it's easier to see what the various cases are testing.

Also note that I swapped the order of server_address and server_address2 for the IPv6 test cases such that the IPv6 address is always in server_address. This is to make the helper function the same for all 8 cases, and is functionally identical because netcode_server_create_overload accounts for receiving the addresses in either order.

@gafferongames gafferongames merged commit 09391c6 into mas-bandwidth:main Sep 18, 2024
4 of 6 checks passed
@dbechrd dbechrd deleted the patch-6 branch September 19, 2024 00:46
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.

2 participants