Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(gnovm/pkg/gnolang): improve
TestPrecompile
(#1659)
This test actually only tested the private `precompileAST()` function, not the public `Precompile()` function. The change makes it call the public function and adds some more cases described in comments like: - unknow-realm (no error) - syntax error - blacklist (was already done) - multiple files (not possible, `Precompile()` is single file only) Also used multiple-line string for file and expected content, for better readability. Relates to #1636 The test can be run with ``` go test ./gnovm/pkg/gnolang/ -v -run Precompile ``` <!-- please provide a detailed description of the changes made in this pull request. --> <details><summary>Contributors' checklist...</summary> - [x] Added new tests, or not needed, or not feasible - [ ] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [ ] Updated the official documentation or not needed - [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [ ] Added references to related issues and PRs - [x] Provided any useful hints for running manual tests - [ ] Added new benchmarks to [generated graphs](https://gnoland.github.io/benchmarks), if any. More info [here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md). </details>
- Loading branch information