Skip to content

Commit

Permalink
Add a ui test with an assertion that has a really long condition.
Browse files Browse the repository at this point in the history
The `\n` in the output is a little surprising. The next commit will deal
with it.
  • Loading branch information
nnethercote committed Oct 9, 2023
1 parent bf9a1c8 commit 40ebcb7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/ui/macros/assert-long-condition.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// run-fail
// check-run-results
// ignore-emscripten no processes
// ignore-tidy-linelength

fn main() {
assert!(1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 == 0);
}
3 changes: 3 additions & 0 deletions tests/ui/macros/assert-long-condition.run.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
thread 'main' panicked at $DIR/assert-long-condition.rs:7:5:
assertion failed: 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18\n + 19 + 20 + 21 + 22 + 23 + 24 + 25 == 0
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

0 comments on commit 40ebcb7

Please sign in to comment.