Skip to content

Commit

Permalink
Add tools for checking that errors don't accidentally change
Browse files Browse the repository at this point in the history
Adds tools/gen_expected_errors.c which is used to create tests/data/expected_errors.txt. This is then used in test_d2itemreader_errors to test that the errors are still the same when d2itemreader_parse_any is run against the entire corpus of fuzzed inputs.

This might be a bit brittle and not particularly helpful in the future, but the basic idea was very useful when checking that the iterative parsing refactor behaved the same as the previous implementation so I figured I'd formalize it/integrate it with the test suite to ensure that the error behavior doesn't change accidentally.
  • Loading branch information
squeek502 committed Aug 19, 2020
1 parent bdddab2 commit e4a9267
Show file tree
Hide file tree
Showing 5 changed files with 1,083 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ save/
*.exe
docs/api.md
docs/INDEX.md
*.sublime-project
*.sublime-workspace

# Created by https://www.gitignore.io/api/macos,linux,cmake,windows

Expand Down
Loading

0 comments on commit e4a9267

Please sign in to comment.