From 990b0b216281c913110dc74fb3d79c22c7f17fef Mon Sep 17 00:00:00 2001 From: alexion Date: Fri, 18 Sep 2026 23:24:15 -0400 Subject: [PATCH] test(xatu): order assertions by actual value --- src/xatu/xatu_test.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/xatu/xatu_test.rs b/src/xatu/xatu_test.rs index b12c26e..e1ef141 100644 --- a/src/xatu/xatu_test.rs +++ b/src/xatu/xatu_test.rs @@ -34,7 +34,7 @@ fn future_sight_rejects_parse_errors() { let error = xatu::future_sight(vec![source_file("testdata/invalid.nix")]) .expect_err("fixture should fail to parse"); - assert_eq!(Code::FailedPrecondition, error.code()); + assert_eq!(error.code(), Code::FailedPrecondition); } #[test] @@ -42,12 +42,12 @@ fn future_sight_reports_empty_inherit_findings() { let report = xatu::future_sight(vec![source_file("testdata/empty_inherit.nix")]) .expect("fixture should parse"); - assert_eq!(1, report.diagnostics.len()); + assert_eq!(report.diagnostics.len(), 1); let diagnostic = &report.diagnostics[0]; assert_eq!( - PathBuf::from("testdata/empty_inherit.nix"), report.files.get(diagnostic.file_id).path, + PathBuf::from("testdata/empty_inherit.nix"), ); - assert_eq!("empty_inherit", diagnostic.finding.rule_id); + assert_eq!(diagnostic.finding.rule_id, "empty_inherit"); }