3 Unit tests should live in a `tests` submodule at the bottom of the module they
4 test. Mark the `tests` submodule with `#[cfg(test)]` so it is only compiled when
7 The `tests` module should contain:
9 * Imports needed only for testing.
10 * Functions marked with `#[test]` striving for full coverage of the parent module's
12 * Auxiliary functions needed for writing the tests.
17 // Excerpt from std::str
23 assert!((eq(&"".to_owned(), &"".to_owned())));
24 assert!((eq(&"foo".to_owned(), &"foo".to_owned())));
25 assert!((!eq(&"foo".to_owned(), &"bar".to_owned())));
30 > **[FIXME]** add details about useful macros for testing, e.g. `assert!`