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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
pub fn hello() -> &'static str {
println!("{}", hallo());
"Hello, World!"
}
fn hallo() -> &'static str {
"Hallo, Welt!"
}
#[cfg(test)]
#[path = "./private_tests/owned_hello.rs"]
mod owned_hello;
#[cfg(test)]
#[path = "./private_tests/mod.rs"]
mod private_tests;
#[cfg(test)]
mod private_tests_with_use {
use super::*;
#[test]
fn it_works_at_private() {
assert_eq!("Hallo, Welt!", hallo());
}
}
#[cfg(test)]
mod private_tests_without_use {
#[test]
fn it_works_at_private() {
assert_eq!("Hallo, Welt!", super::hallo());
}
}
#[cfg(test)]
#[path = "./integration_tests/i_hello.rs"]
mod i_hello;
#[cfg(test)]
#[path = "./integration_tests/mod.rs"]
mod integration_tests;