Skip to content

Commit

Permalink
test: improve gnovm/pkg/gnolang.TestPrecompile
Browse files Browse the repository at this point in the history
This test was actually only testing the private `precompileAST` function
and not the public `Precompile` function.

The change makes it call the public function and add some more cases
outlined in comments like
- unknow-realm (no error)
- syntax error
- black list (was already done)
- multiple files (not possible, `Precompile` is single file only)

Also used multiple lines 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 ea26bd1
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 ea26bd1

Please sign in to comment.