mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
unit testing
+3
-3
@@ -58,10 +58,10 @@ avoid import of functions, instead `mod::func()`
|
||||
* Lines should not be longer than 100 characters.
|
||||
* Use spaces for indentation not tabs.
|
||||
|
||||
# Testing
|
||||
|
||||
put tests in a test module at the bottom of the modules they test. Use `#[cfg(test)]` to only compile when testing.
|
||||
# Unit testing
|
||||
|
||||
* Put tests in a test module at the bottom of the modules they test.
|
||||
* Use `#[cfg(test)]` to only compile when testing. Example:
|
||||
```
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
|
||||
Reference in New Issue
Block a user