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

Streamline testing with testCases and reflect.DeepEquals #168

Open
lumjjb opened this issue Oct 21, 2022 · 0 comments
Open

Streamline testing with testCases and reflect.DeepEquals #168

lumjjb opened this issue Oct 21, 2022 · 0 comments

Comments

@lumjjb
Copy link
Collaborator

lumjjb commented Oct 21, 2022

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.

@lumjjb lumjjb mentioned this issue Oct 21, 2022
3 tasks
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

No branches or pull requests

1 participant