noname
noname copied to clipboard
Use Insta for test noname parser and analyzer
Motivation
We are facing a few problems when testing noname:
- Can't test fails to compile messages cli.
- Can't ensure consistency when updating parser or analyzer error messages.
We can use Insta to help us create better test suites. The idea is to compare the compiler output with the expected snapshot output.
do you think it would make sense to use it for the example tests? https://github.com/zksecurity/noname/blob/main/src/tests/examples.rs
as right now we save the files here: https://github.com/zksecurity/noname/blob/main/examples/fixture/asm/kimchi/arithmetic.asm and compare with the compiler output.
if so do you want to create a PR to do that :o ?
And for compiler output error too i.e. for this PR I don't know how and where I can create a test for this logic. With Insta, We only need to compare the compiler output and snapshot.
if so do you want to create a PR to do that :o ?
Yes :D