a-mir-formality icon indicating copy to clipboard operation
a-mir-formality copied to clipboard

Test harness / driver

Open nikomatsakis opened this issue 3 years ago • 0 comments

We should create a test harness / rustc driver formalityc that works as follows:

  • It parses an input rust crate and compiles it to MIR
  • It generates MIR formality files from the MIR and some portion of the interfaces of other crates
  • It writes those files to a test file and then invokes racket to run MIR formality against them
    • It reads some sort of special comments (e.g., // compile-fail) to determine what behavior is expected.

This can be used to extend our test suite with Rust test files rather than hand-coding things in Racket.

Eventually I expect the racket code to go away and be replaced with either Rust code (like @jackh726's a-mir-formality-rs) or (my current preference) some Rust interpreter of our definition.

nikomatsakis avatar May 27 '22 09:05 nikomatsakis