Skip to content

Commit

Permalink
test: improve gnovm/pkg/gnolang.TestPrecompile
Browse files Browse the repository at this point in the history
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 gnolang#1636
  • Loading branch information
tbruyelle committed Feb 15, 2024
1 parent 6fb3317 commit 478e0e5
Showing 1 changed file with 259 additions and 67 deletions.
326 changes: 259 additions & 67 deletions gnovm/pkg/gnolang/precompile_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 478e0e5

Please sign in to comment.