noir-lang / noir

Noir is a domain specific language for zero knowledge proofs
https://noir-lang.org
Apache License 2.0
871 stars 188 forks source link

chore: add testcase for slice equality failing in comptime interpreter #5277

Closed TomAFrench closed 2 months ago

TomAFrench commented 3 months ago

Description

Problem*

Resolves

Summary*

This PR adds a test case for #5273 which tracks whether the compile is properly handling comptime slice equalities. Once #5273 is fixed then it should be moved to compile_success_empty.

Additional Context

Documentation*

Check one:

PR Checklist*

jfecher commented 3 months ago

This test needs to be exempted from the legacy tests for CI to pass. I think we can just wait and add this test as part of https://github.com/noir-lang/noir/pull/5276 when it is expected to work though.

Sorry, wrong PR. This is part of the much larger work on getting trait dispatch & operator overloading working in the interpreter

TomAFrench commented 3 months ago

I've added an entry to ignore the legacy test.

TomAFrench commented 3 months ago

My thinking on this is it's generally just observability. Tests become us asserting that the compiler does what we expect rather than just "working correctly". This ensure that if the behaviour of the compiler changes in future then we'll be aware of it.

jfecher commented 3 months ago

@TomAFrench I can see that argument, but doesn't it apply to all known issues? I think we should just wait until traits / operator overloading is implemented in the interpreter to add this test since I don't see it being accidentally added.