test(xatu): reorder future sight cases
This commit is contained in:
@@ -21,6 +21,17 @@ fn future_sight_reports_clean_sources_as_clean() {
|
|||||||
assert!(report.is_clean());
|
assert!(report.is_clean());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn future_sight_rejects_parse_errors() {
|
||||||
|
let error = xatu::future_sight(vec![source_file(
|
||||||
|
"invalid.nix",
|
||||||
|
include_str!("testdata/invalid.nix"),
|
||||||
|
)])
|
||||||
|
.expect_err("fixture should fail to parse");
|
||||||
|
|
||||||
|
assert_eq!(Code::FailedPrecondition, error.code());
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn future_sight_reports_empty_inherit_findings() {
|
fn future_sight_reports_empty_inherit_findings() {
|
||||||
let report = xatu::future_sight(vec![source_file(
|
let report = xatu::future_sight(vec![source_file(
|
||||||
@@ -38,14 +49,3 @@ fn future_sight_reports_empty_inherit_findings() {
|
|||||||
);
|
);
|
||||||
assert_eq!("empty_inherit", diagnostic.finding.rule_id);
|
assert_eq!("empty_inherit", diagnostic.finding.rule_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn future_sight_rejects_parse_errors() {
|
|
||||||
let error = xatu::future_sight(vec![source_file(
|
|
||||||
"invalid.nix",
|
|
||||||
include_str!("testdata/invalid.nix"),
|
|
||||||
)])
|
|
||||||
.expect_err("fixture should fail to parse");
|
|
||||||
|
|
||||||
assert_eq!(Code::FailedPrecondition, error.code());
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user