1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn it_works() {
        assert_eq!(2 + 2, 4);
    }

    #[test]
    fn print_outs() {
        private_function();
        public_function();
        indirect_access();
    }
}

pub fn public_function() {
    println!("called boilerup's `public_function()`");
}

fn private_function() {
    println!("called boilerup's `private_function()`");
}

pub fn indirect_access() {
    print!("called boilerup's `indirect_access()`, that\n> ");

    private_function();
}