Conversation
[FileCheck](https://llvm.org/docs/CommandGuide/FileCheck.html) is a tool created by the LLVM folks to embed textual assertions about the output code in test cases. This comment sets up our test suite so that we can put `CHECK` directives into the test files, and `run.sh` will use `FileCheck` to see if the resulting `.wat` file matchs the specs. I am using this in one example to assert that the mutually recursive functions in `mutrec2.as` are compiled to direct calls (and not closures). This requires you to have `FileCheck` in your PATH. The easiest way of doing that is to run nix-env -i -f . -A filecheck
ggreif
approved these changes
Mar 7, 2019
Contributor
ggreif
left a comment
There was a problem hiding this comment.
This is cool. I can certainly use it for my codegen work.
dfinity-bot
added a commit
that referenced
this pull request
Apr 21, 2021
## Changelog for candid: Branch: master Commits: [dfinity/candid@5ab5d320...043c81bb](dfinity/candid@5ab5d32...043c81b) * [`043c81bb`](dfinity/candid@043c81b) fix clippy warning ([dfinity/candid#221](http://r.duckduckgo.com/l/?uddg=https://github.com/dfinity/candid/issues/221))
mergify bot
pushed a commit
that referenced
this pull request
Apr 21, 2021
## Changelog for candid: Branch: master Commits: [dfinity/candid@5ab5d320...043c81bb](dfinity/candid@5ab5d32...043c81b) * [`043c81bb`](dfinity/candid@043c81b) fix clippy warning ([dfinity/candid#221](http://r.duckduckgo.com/l/?uddg=https://github.com/dfinity/candid/issues/221))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FileCheck is a tool
created by the LLVM folks to embed textual assertions about the output
code in test cases. This comment sets up our test suite so that we can
put
CHECKdirectives into the test files, andrun.shwill useFileCheckto see if the resulting.watfile matches the specs.I am using this in one example to assert that the mutually recursive
functions in
mutrec2.asare compiled to direct calls (and notclosures).
This requires you to have
FileCheckin your PATH. The easiest way ofdoing that is to run