Created
November 17, 2022 00:40
-
-
Save metarsit/9957e9babda459ff946b5c518aa7dfdc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type TestCase struct { | |
| a, b any | |
| expect bool | |
| } | |
| // GenerateTestCasesForEqual takes in a number of test cases to generate | |
| // and create an True cases for Equal function | |
| func GenerateTestCasesForEqual(numberOfTestCases int) []TestCase { | |
| tcs := make([]TestCase, numberOfTestCases) | |
| for i := 0; i < numberOfTestCases; i++ { | |
| tc := TestCase{ | |
| a: i, | |
| b: i, | |
| expect: true, | |
| } | |
| tcs[i] = tc | |
| } | |
| return tcs | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment