Skip to main content

calculator_denize/
lib.rs

1pub mod calc1;
2pub mod calc2;
3
4
5#[cfg(test)]
6mod tests {
7    use super::*;
8
9    #[test]
10    fn it_works() {
11        let result = calc1::add(2, 2);
12        assert_eq!(result, 4);
13    }
14
15    #[test]
16        fn test_adicao() {
17            assert_eq!(calc1::add(2, 3), 5);
18        }
19
20    #[test]
21        fn test_subtracao() {
22            assert_eq!(calc1::sub(5, 2), 3);
23        }
24
25    #[test]
26        fn test_multiplicacao() {
27            assert_eq!(calc2::multiply(2, 3), 6);
28        }
29
30    #[test]
31        fn test_divisao() {
32            assert_eq!(calc2::rate(6, 2), 3);
33        }
34}