Files
rust-vmm-ci/src/lib.rs
Patrick Roy 665f31f4b4 Add Rust unittest so that test_coverage properly self-tests
Using kcov, a coverage of 33.3% was reported, even though that are no
rust-test code in the dummy crate that is included in this repository.
This commit adds an actual unit test, so that the test_coverage test
actually properly self-tests here.

Signed-off-by: Patrick Roy <roypat@amazon.co.uk>
2023-09-01 10:21:56 +00:00

12 lines
154 B
Rust

pub fn add(a: u32, b: u32) -> u32 {
a + b
}
#[cfg(test)]
mod tests {
#[test]
fn test_add() {
assert_eq!(super::add(1, 2), 3)
}
}