-
Notifications
You must be signed in to change notification settings - Fork 845
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
fix(key),test: simplify the input analysis code #568
Conversation
c7f520d
to
012ddce
Compare
5f79f56
to
ce2a006
Compare
ce2a006
to
9e4b2b0
Compare
@muesli this is ready again. |
if m, ok := v.(KeyMsg); ok && | ||
m.String() != td.out[i].(KeyMsg).String() { | ||
t.Fatalf(`expected a keymsg %q, got %q`, td.out[i].(KeyMsg), m) | ||
// randTest defines the test input and expected output for a sequence |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good enough for now, but I guess we could eventually replace the randomizer with a proper fuzzer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that is reasonable. Do you want to do this right away? Is there something standard we can use?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep it as it is, the code looks and works fine for me. As soon as we bump Go to 1.18 we can start moving to the Go fuzzer that's part of the standard toolchain: https://go.dev/security/fuzz/
9e4b2b0
to
f775c66
Compare
This PR contains only the input simplification part of #511.
cc @muesli