Skip to content

Commit

Permalink
Panic on unsupported type
Browse files Browse the repository at this point in the history
  • Loading branch information
untoldwind committed Apr 2, 2024
1 parent 4f507f6 commit 2607924
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arbitrary/gen_for_kind.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package arbitrary

import (
"fmt"
"reflect"

"github.com/leanovate/gopter"
Expand Down Expand Up @@ -336,6 +337,8 @@ func (a *Arbitraries) genForKind(rt reflect.Type) gopter.Gen {
keyGen := a.GenForType(rt.Key())
valueGen := a.GenForType(rt.Elem())
return gen.MapOf(keyGen, valueGen)
default:
panic(fmt.Sprintf("Unsupported GenForType: %v", rt.Kind()))
}
return nil
}
File renamed without changes.

0 comments on commit 2607924

Please sign in to comment.