// TestNoMissing tests that we correctly detect exhaustive case analysis.
TestNoMissing tests that we correctly detect exhaustive case analysis.
// TestNoMissing tests that we correctly detect exhaustive case analysis .
func TestNoMissing(t *testing.T) {
	code := `
package main
//go-sumtype:decl T
type T interface { sealed() }
type A struct {}
func (a *A) sealed() {}
type B struct {}
func (b *B) sealed() {}
type C struct {}
func (c *C) sealed() {}
func main() {
	switch T(nil).(type) {
	case *A, *B, *C:
	}
}
`
	tmpdir, pkgs := setupPackages(t, code)
	defer teardownPackage(t, tmpdir)
	errs := run(pkgs)
	assert.Len(t, errs, 0)
}
func TestNoMissing ( t * testing . T ) { code := `
package main

//go-sumtype:decl T

type T interface { sealed() }

type A struct {}
func (a *A) sealed() {}

type B struct {}
func (b *B) sealed() {}

type C struct {}
func (c *C) sealed() {}

func main() {
	switch T(nil).(type) {
	case *A, *B, *C:
	}
}
` tmpdir , pkgs := setupPackages ( t , code ) defer teardownPackage ( t , tmpdir ) errs := run ( pkgs ) assert . Len ( t , errs , 0 ) }
TestNoMissing tests that we correctly detect exhaustive case analysis.
TestNoMissing tests that we correctly detect exhaustive case analysis .