Skip to content

Commit

Permalink
adding a test
Browse files Browse the repository at this point in the history
  • Loading branch information
maebli committed Sep 24, 2024
1 parent b352cc8 commit 0fd16ef
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions python/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,15 @@ fn pymbusparser(m: &Bound<'_, PyModule>) -> PyResult<()> {
m.add_function(wrap_pyfunction!(m_bus_parse, m)?)?;
Ok(())
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn test_parse_application_layer() {
let data_record = "2F2F03740100000413FCE0F5054413FCE0F505426C11390F0100F02F2F2F2F2F";
let result = parse_application_layer(data_record).unwrap();
print!("{}", result);
}
}

0 comments on commit 0fd16ef

Please sign in to comment.