Skip to content
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

Shrink runtime exception failures #221

Open
Janiczek opened this issue Aug 17, 2023 · 0 comments
Open

Shrink runtime exception failures #221

Janiczek opened this issue Aug 17, 2023 · 0 comments

Comments

@Janiczek
Copy link
Collaborator

Currently when a test throws a runtime exception, we catch that and return a test failure. (Good.)
But we don't shrink the input.

This should be doable: instead of

try {
  
  do {
    input = fuzz()
    test result = runTest(input)
  } while test result is not failure and attempt count limit is not reached 

  if test result is failure {
    test result = shrink(test result)
  }

  return test result

} catch {
  return failure
}

we could do:

do {
  input = fuzz()

  try {
    test result = runTest(input)
  } catch {
    test result = failure
  }

} while test result is not failure and attempt count limit is not reached

if test result is failure {
  test result = shrink(test result)
}

return test result

so that crash failures behave the same way as other failures, with "Given $INPUT:" reported, that input properly shrunk, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant