Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
thebino committed Oct 6, 2024
1 parent 1eab23e commit 53a10a2
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,18 @@
//!
//! ZigBee is a protocol stack based on the ZigBee specification 22 1.0
//!
mod lib {
pub fn add(a: i32, b: i32) -> i32 {
a + b
}

#[cfg(test)]
mod tests {
// Note this useful idiom: importing names from outer (for mod tests) scope.
use super::*;

#[test]
fn test_add() {
assert_eq!(add(1, 2), 3);
}
}

0 comments on commit 53a10a2

Please sign in to comment.