Skip to content

Commit

Permalink
fix a test validation
Browse files Browse the repository at this point in the history
  • Loading branch information
ilius committed Jul 11, 2023
1 parent 4c4dea5 commit 492b1c5
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions generate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1457,13 +1457,12 @@ func TestGenerate(t *testing.T) {
Entropy: [2]float64{4.7, 4.8},
Validate: func(p string) bool {
for _, c := range p {
if c == ')' || c == '(' || c == '}' {
return true
}
if c == '0' {
return true
switch {
case c == ')' || c == '(' || c == '}':
case c == '0':
default:
return false
}
return false
}
return true
},
Expand Down

0 comments on commit 492b1c5

Please sign in to comment.