[EH] Convert EH tests into lit tests - #3923
Conversation
This converts most EH tests in test/passes into test/lit/passes. Fixed some files to follow 2-space indentation and improved some comments.
|
Awesome! Besides the edits you mentioned, did you just use the update_lit_checks.py script to do this conversion? |
|
Except for 2-3 tests yes, which required 1. stack IR printing or 2. module elements printing. They don't have the at the top. I thought about not autogenerating the whole function in case it is slightly longer but only adding lines that are relevant, but it was not very easy because in case we want to check this pattern in a function: (drop
(i32.add
(local.get $x)
(i32.const 3)
)
)Simply doing the below doesn't work in a lot of times because the first |
| ;; --------------------------------------------------------------------------- | ||
| (import "a" "b" (func $foo (result i32))) | ||
| (event $event$0 (attr 0) (param i32)) | ||
| (func $callee-with-label |
There was a problem hiding this comment.
Why doesn't this function have check lines? If they were manually deleted, they will come back next time someone runs ./auto_update_tests.py, so it would be better just to keep them in.
There was a problem hiding this comment.
This is strange. update_lit_checks.py actually doesn't update this. Also (func $callee in the same file. Not sure why.
There was a problem hiding this comment.
Must be a bug in the regex used by the script. I wouldn't worry about it if those functions aren't critical to the test.
There was a problem hiding this comment.
This indeed can't exist because $callee-with-label is inlined! 🙃
There was a problem hiding this comment.
ohhh, that makes sense. Sorry for the confusion!
Co-authored-by: Thomas Lively <7121787+tlively@users.noreply.github.com>
This converts most EH tests in test/passes into test/lit/passes. Fixed
some files to follow 2-space indentation and improved some comments.