Lesson 27 of 50 · rust
Writing Tests
Duration: 15 minutes
Lesson 27 of 50 · rust
Duration: 15 minutes
tests directory or inline with #[cfg(test)].\n\nrust\n#[cfg(test)]\nmod tests {\n #[test]\n fn it_works() {\n assert_eq!(2 + 2, 4);\n }\n}\n\n\nRun tests with cargo test.