Skip to content

A more verbose matching failure for mir tests - #38289

Merged
bors merged 1 commit into
rust-lang:masterfrom
bluss:mir-verbose-test-fail
Dec 21, 2016
Merged

A more verbose matching failure for mir tests#38289
bors merged 1 commit into
rust-lang:masterfrom
bluss:mir-verbose-test-fail

Conversation

@bluss

Copy link
Copy Markdown
Contributor

This makes it easier to work with mir test failures during development.

  • Show which expected line was not found
  • Show full expected output
  • Show full actual output

This makes it easier to work with mir test failures during development.
- Show which expected line was not found
- Show full expected output
- Show full actual output
@rust-highfive

Copy link
Copy Markdown
Contributor

r? @brson

(rust_highfive has picked a reviewer for you, use r? to override)

@bluss

Copy link
Copy Markdown
ContributorAuthor

Example output below. It's long, but it's useful when developing.

failures: ---- [mir-opt] mir-opt/deaggregator_test.rs stdout ----
thread '[mir-opt] mir-opt/deaggregator_test.rs' panicked at 'ran out of mir dump output to match against.Did not find expected line:" _0 = Baz { x: _3, y: const F32(0), z: const false };"Expected: bb0:{
_2 = _1;
_3 = _2;
_0 = Baz{x: _3,y:constF32(0),z:constfalse};return;}Actual:fnbar(_1:usize) -> Baz{letmut _0:Baz;
scope 1{let _2: usize;}letmut _3:usize;bb0:{StorageLive(_2);
_2 = _1;StorageLive(_3);
_3 = _2;(_0.0: usize) = _3;(_0.1:f32) = constF32(0);(_0.2: bool) = constfalse;StorageDead(_3);StorageDead(_2);return;}}', src/tools/compiletest/src/runtest.rs:2302
note:Run with `RUST_BACKTRACE=1` for a backtrace.

@michaelwoerister

Copy link
Copy Markdown
Member

@bors r+

@bors

bors commented Dec 19, 2016

Copy link
Copy Markdown
Collaborator

📌 Commit 90c5b71 has been approved by michaelwoerister

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Dec 20, 2016
…aelwoerister
A more verbose matching failure for mir tests
This makes it easier to work with mir test failures during development.
- Show which expected line was not found
- Show full expected output
- Show full actual output
bors added a commit that referenced this pull request Dec 20, 2016
@bors
bors merged commit 90c5b71 into rust-lang:masterDec 21, 2016
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@bluss@rust-highfive@michaelwoerister@bors@brson