# dev dependencies are added to Cargo.toml in the [dev-dependencies] section
# These dependencies are not propagated to other packages which depend on
# this package. They are used when you need to have a certain
# dependency only for tests/benchmarks/examples ect...
[dependencies]
# your dependencies
[dev-dependencies]
pretty_assertions = "1" # <--- the dependencies you only need during dev
========================================================================
#[cfg(test)]
mod tests {
use super::*;
use pretty_assertions::assert_eq;
#[test]
fn test_fn() {
assert_eq!(your_fn(2, 3), 5);
}
}