Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ impl TryFrom<String> for Property {
"weak" => Ok(Property::Weak),
"very-weak" => Ok(Property::VeryWeak),
"inherently-weak" => Ok(Property::InherentlyWeak),
"terminatl" => Ok(Property::Terminal),
"terminal" => Ok(Property::Terminal),
"tight" => Ok(Property::Tight),
"colored" => Ok(Property::Colored),
unknown => Err(format!("{} is not a valid property", unknown)),
Expand Down Expand Up @@ -313,6 +313,15 @@ impl AcceptanceInfo {
mod tests {
use crate::AcceptanceCondition;

#[test]
fn terminal_property_is_parsed() {
// the spelling "terminal" is the one that the writer produces
assert_eq!(
super::Property::try_from("terminal".to_string()),
Ok(super::Property::Terminal)
);
}

#[test]
fn parity_acceptance_creator() {
let parity_condition = super::AcceptanceCondition::parity(3);
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ impl HoaRepresentation {
})
}

/// Returns the number of edges in the automaton.
/// Returns the start state conjunction.
pub fn start(&self) -> Vec<&StateConjunction> {
debug_assert!(
self.header()
Expand Down Expand Up @@ -490,7 +490,7 @@ mod tests {
let hoa_aut = HoaRepresentation::try_from(contents);

if let Err(err) = hoa_aut {
error!("Encountered paring error\n{}", err);
error!("Encountered parsing error\n{}", err);
return;
}

Expand Down
Loading