]> git.proxmox.com Git - rustc.git/blob - src/doc/book/redirects/testing.md
bump version to 1.80.1+dfsg1-1~bpo12+pve1
[rustc.git] / src / doc / book / redirects / testing.md
1 % Testing
2
3 <small>There is a new edition of the book and this is an old link.</small>
4
5 > Rust includes support for writing software tests within the language itself.
6
7 ```rust
8 #[cfg(test)]
9 mod tests {
10 #[test]
11 fn it_works() {
12 }
13 }
14 ```
15
16 ---
17
18 Here are the relevant sections in the new and old books:
19
20 * **[in the current edition: Ch 11.00 — Testing][2]**
21 * <small>[In the first edition: Ch 4.2 — Testing][1]</small>
22
23
24 [1]: https://doc.rust-lang.org/1.30.0/book/first-edition/testing.html
25 [2]: ch11-00-testing.html