wasmweb-sample/math/src/lib.rs

14 lines
189 B
Rust
Raw Normal View History

#[allow(dead_code)]
pub fn sum(a: i32, b: i32) -> i32 {
a + b
2020-08-20 15:27:50 +07:00
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn it_works() {
assert_eq!(sum(10, 10), 20);
2020-08-20 15:27:50 +07:00
}
}