Skip to content

Commit

Permalink
Add first unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
hokeun committed Jan 26, 2024
1 parent 294354a commit 1e3089e
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion rust/rti/src/tag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ impl Tag {
// );
result
}

pub fn lf_tag_add(a: &Tag, b: &Tag) -> Tag {
if a.time() == NEVER || b.time() == NEVER {
return Tag::never_tag();
Expand All @@ -194,3 +194,15 @@ impl Tag {
result
}
}

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

#[test]
fn test_lf_tag_compare() {
let t1 = Tag::new(0, 0);
let t2 = Tag::new(0, 0);
assert_eq!(0, Tag::lf_tag_compare(&t1, &t2))
}
}

0 comments on commit 1e3089e

Please sign in to comment.