Repository navigation
Script to run sample files and compare against known outputs - #34
Conversation
Zamua
left a comment
There was a problem hiding this comment.
Great work!
I think the expected files should not include gradle output. The only output we should consider is output from the compiler itself.
An example: The file tests/outputs/precedence_compile.exp should have an expected value of an empty file (or whatever the LJ compiler spits out on success), but not anything from the gradle build tool (ex: BUILD SUCCESSFUL)
Do you think that would be a simple change?
|
I changed the compile script to run in quiet mode; that should suppress gradle's messages, but it still prints compiler messages if there are any |
|
Nice! last thing, can you squash those commits into one? You can keep the 'make a script to run all sample programs and test their outputs' message, throwaway others |
|
Squashed |
|
Right now some of the tests are only valid for running xor testing. We should probably improve the tests at some point so that they are all valid for both running and testing. This would reduce confusion for newcomers as well. Thanks @hinescd for writing this! |
I wrote a script (dotests.sh - open to renaming) that compiles, runs, and tests .lj files and then diffs their outputs against previously known outputs. This script can be helpful when making changes to the compiler so you can be sure that you didn't break anything that was previously working.