tools-golang
tools-golang copied to clipboard
Streamline testing with testCases and reflect.DeepEquals
Currently , each test case is a test on its own and can be collapsed to a single test case with shared test function uses the following golang idiomatic test pattern:
testCases := struct {
creatorType string
...
expected v2_3.CreationInfo
}{
...
}
for _, t := range testCases {
t.Run(...)
}
In addition, reflect.DeepEquals
can be used instead to do cleaner comparisons.