Skip to content

Commit

Permalink
Fix ensure only enter repeat after down was encountered
Browse files Browse the repository at this point in the history
Signed-off-by: Sean Young <[email protected]>
  • Loading branch information
seanyoung committed May 6, 2024
1 parent c47cb0d commit 72c88c9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
11 changes: 6 additions & 5 deletions irp/src/build_nfa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1090,12 +1090,13 @@ impl<'a> Builder<'a> {
if self.cur.seen_edges {
self.add_done(event)?;

self.add_edge(Edge {
dest: 0,
actions: vec![],
});
if event == Event::Repeat {
self.add_edge(Edge {
dest: node,
actions: vec![],
});
}

self.set_head(0);
self.cur.seen_edges = false;
}

Expand Down
2 changes: 1 addition & 1 deletion irp/tests/bpf_decoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ fn decode_all() {
failing_protocols.len()
);

assert_eq!(failing_protocols.len(), 38);
assert_eq!(failing_protocols.len(), 36);
}

fn bpf_decode(dfa: &DFA, options: &Options, name: &str, message: &Message) -> Vec<u64> {
Expand Down
2 changes: 1 addition & 1 deletion irp/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ fn decode_all() {
println!("tests: {total_tests} fails: {fails}");
println!("Failed protocols: {failed_protocols:?}");

let expected_failures = HashSet::from(["Pioneer-2Part", "Epson", "F12x", "Roku-8bit"]);
let expected_failures = HashSet::from(["Epson", "F12x"]);
assert_eq!(failed_protocols, expected_failures);
}

Expand Down

0 comments on commit 72c88c9

Please sign in to comment.