Skip to content

Instantly share code, notes, and snippets.

@metarsit
Created November 17, 2022 00:40
Show Gist options
  • Select an option

  • Save metarsit/9957e9babda459ff946b5c518aa7dfdc to your computer and use it in GitHub Desktop.

Select an option

Save metarsit/9957e9babda459ff946b5c518aa7dfdc to your computer and use it in GitHub Desktop.
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