Skip to content

Commit

Permalink
added quotes in unit_testing
Browse files Browse the repository at this point in the history
  • Loading branch information
funkill committed Sep 12, 2019
1 parent 4bfa227 commit ba3bba8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/testing/unit_testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,10 @@ failures:
test result: FAILED. 1 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
```

## Tests and ?
None of the previous unit test examples had a return type. But in Rust 2018, your unit tests can return Result<()>, which lets you use `?` in them! This can make them much more concise.
## Tests and `?`
None of the previous unit test examples had a return type. But in Rust 2018,
your unit tests can return `Result<()>`, which lets you use `?` in them! This
can make them much more concise.

```rust,editable
fn sqrt(number: f64) -> Result<f64, String> {
Expand All @@ -95,7 +97,7 @@ mod tests {
}
```

See [The Edition Guide][editionguide] for more details.
See ["The Edition Guide"][editionguide] for more details.

## Testing panics

Expand Down

0 comments on commit ba3bba8

Please sign in to comment.