Rust: Unit tests in a separate file
In rust, tests are written in the same file as the code. But I want to have the tests in a separate file.
Conventionally, only the integration tests are written in files under tests folder. 1
I just wanted to have the unit tests in a separate file. So I created a file src/my_tests.rs and moved all the tests there.
But cargo test kept saying running 0 tests
Turns out, I’m not the only one. 2