Skip to content

Commit

Permalink
Automatically test that syntax-rs is unchanged
Browse files Browse the repository at this point in the history
  • Loading branch information
jaybosamiya committed Nov 10, 2023
1 parent ed94dca commit b9cc079
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/syntax-rs-unchanged.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//! Testing ../examples/syntax.rs

use verusfmt::parse_and_format;

/// Just an automatic test to make sure that ../examples/syntax.rs is left unchanged by verusfmt.
///
/// This is essentially intended to be a snapshot test, like ./snap-tests.rs, but only as a quick
/// indicator for whether `syntax.rs` has been modified by any change, in order to ensure that
/// `syntax.rs` always in sync with the output that would show up from verusfmt.
#[test]
fn syntax_rs_unchanged() {
let syntax_rs = include_str!("../examples/syntax.rs").to_owned();
assert_eq!(parse_and_format(&syntax_rs), Ok(syntax_rs));
}

0 comments on commit b9cc079

Please sign in to comment.