Skip to content

Commit

Permalink
Fix for #62
Browse files Browse the repository at this point in the history
  • Loading branch information
untoldwind committed Jan 13, 2020
1 parent cdb2f0e commit 29a8ad6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion derived_gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (d *derivedGen) Generate(genParams *GenParameters) *GenResult {
Result: nil,
Labels: result.Labels,
ResultType: d.resultType,
Sieve: d.Sieve(result.Sieve),
Sieve: d.Sieve(sieves...),
}
}
}
Expand Down
5 changes: 4 additions & 1 deletion example_libraries_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ type TestLibrary struct {

func genTestLibrary() gopter.Gen {
return gen.Struct(reflect.TypeOf(&TestLibrary{}), map[string]gopter.Gen{
"Name": gen.AlphaString(),
"Name": gen.AlphaString().SuchThat(func(s string) bool {
// Non-empty string
return s != ""
}),
"Librarians": gen.UInt8Range(1, 255),
"Books": gen.SliceOf(genTestBook()),
})
Expand Down

0 comments on commit 29a8ad6

Please sign in to comment.