-
Notifications
You must be signed in to change notification settings - Fork 342
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
Generic function support #165
Comments
For some inputs, gotests fails to generate tests:
package typeparams
type Set[T comparable] struct {
m map[T]struct{}
}
func (o *Set[T]) Add(v T) {
o.m[v] = struct{}{}
}
func (o *Set[T]) Has(v T) bool {
_, ok := o.m[v]
return ok
}
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Filing this issue to track/ discuss generic function support for gotests.
Currently, gotests produces a table driven test for a function with type parameters, but the test needs to actually be modified to include concrete types (the test file will have build errors).
Example:
typeparams.go:
typeparams_test.go:
Can better table driven tests be generated for functions with type params / should the generated tests make sure there are no build errors?
Related go issue: golang/go#50558
The text was updated successfully, but these errors were encountered: