Back to Rust Lang

Testing

redirects/testing.md

latest524 B
Original Source

% Testing

<small>There is a new edition of the book and this is an old link.</small>

Rust includes support for writing software tests within the language itself.

rust
#[cfg(test)]
mod tests {
    #[test]
    fn it_works() {
    }
}

Here are the relevant sections in the new and old books: