Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Integration test directory structure

Integration tests for the Noir compiler are broken down into the following directories:

  • compile_failure: programs which are not valid or unsatisfiable Noir code and so the compiler should reject.
  • compile_success_empty: programs which are valid satisfiable Noir code but have no opcodes.
  • compile_success_contract: contracts which are valid Noir code.
  • execution_success: programs which are valid Noir satisfiable code and have opcodes.
  • execution_panic: a temporary location for tests that panic, but may or may not be valid or satisfiable Noir code. These tests should:
    • Each have a corresponding open issue
    • Be moved into another test folder once the panic is addressed
  • execution_stack_overflow: a temporary location for tests that stack overflow, but may or may not be valid or satisfiable Noir code. These tests should:
    • Each have a corresponding open issue
    • Be moved into another test folder once the stack overflow is addressed
    • NOTE: these tests are not currently run, either locally or CI

The current testing flow can be thought of as shown:

flowchart TD

    subgraph compile_failure
        A1[Attempt to compile] --> A2[Assert compilation fails]
    end

    subgraph compile_success_empty
        B1[Attempt to compile] --> B2[Assert compilation succeeds]
        B2 --> B3[Assert empty circuit]
    end

    subgraph execution_success
        C1[Attempt to compile] --> C2[Assert compilation succeeds]
        C2 --> C3[Write circuit to file]
        C3 --> C4[Assert execution succeeds]
        C4 --> C5[Write witness to file]
        
        C6[Publish witness + circuit as artifact]
        C3 --> C6
        C5 --> C6
    end

    subgraph compile_success_contract
        D1[Attempt to compile] --> D2[Assert compilation succeeds]
    end
Loading

execution_success vs compile_success_empty

Note that execution_success and compile_success_empty are distinct as compile_success_empty is expected to compile down to an empty circuit. This may not be possible for some argument-less circuits in the situation where instructions have side-effects or certain compiler optimizations are missing, but once moved to compile_success_empty a program compiling down to a non-empty circuit is a compiler regression.