mirror of
https://github.com/tree-sitter/tree-sitter.git
synced 2026-09-10 07:26:23 -04:00
fix(generate): correct test assertion for inlined supertype warning
This commit is contained in:
parent
03ae6710cd
commit
fe3fe327e2
|
|
@ -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> },
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
}]
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue