Closed BradleyBoutcher closed 2 years ago
I realized I didn't notify anyone about this PR, so I apologize for the bother, and no rush! @yuokada @osamingo @YoshiyukiMineo
@BradleyBoutcher Sorry for late reply. I'm just a contributor. I don't have any responsibility or permission for this repository.
No worries! Thank you for the response!
Thank you for your PR.
This change introduces three common Golang patterns to the SonyFlake project test framework:
types: this will allow fine-tuned control over imported types by defining how they will be used, project-wide
mock: this allows the generation of mock constructors, which lends itself to testing any individual path in a function by "injecting" a mock object which matches the expected type
array-based-testing:
privateIPv4
andlower16BitPrivateIP
were lacking tests for their error paths, but using types and mocks, I was able add two array-based tests that cover all test cases for these methodsThis change also increases test coverage to 💯, while adding no additional time for testing ⌛ .
This is a really cool project, and I'd be happy to contribute more!