fix(generate): correct test assertion for inlined supertype warning

This commit is contained in:
Will Lillis 2026-08-20 00:55:04 -04:00
parent 03ae6710cd
commit fe3fe327e2
2 changed files with 5 additions and 5 deletions

View file

@ -254,7 +254,7 @@ impl Default for OptLevel {
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
pub enum Diagnostic {
UnnecessaryConflicts(Vec<Vec<String>>),
UnaryChoice { name: Option<String> },

View file

@ -445,11 +445,11 @@ mod tests {
// The supertype entry is dropped with a warning, and the rule stays inlined.
assert!(meta.supertypes.is_empty());
assert_eq!(meta.inline, vec![Symbol::non_terminal(1)]);
assert_eq!(diagnostics.len(), 1);
assert_eq!(
diagnostics[0].to_string(),
"rule `_v2` is both a supertype and inlined. the supertype is \
ignored. this will become an error in a future release."
diagnostics,
[Diagnostic::SupertypeInlined {
name: "_v2".to_string()
}]
);
}