comtron/lib.rs
1pub fn complex_freq_comp(a: f32) -> f32 {
2 a + 2.0f32
3}
4
5#[cfg(test)]
6mod tests {
7 use super::*;
8
9 #[test]
10 fn it_works() {
11 let result = 2 + 2;
12 assert_eq!(result, 4);
13 }
14
15 #[test]
16 fn test_complex_freq_comp() {
17 let result = complex_freq_comp(10f32);
18 assert_eq!(result, 12.0);
19 }
20}