@@ -89,14 +89,14 @@ the result of running that test is `ok`. The overall summary `test result: ok.`
89
89
means that all the tests passed, and the portion that reads `1 passed; 0
90
90
failed` totals the number of tests that passed or failed.
91
91
92
- It' s possible to mark a test as ignored so it doesn' t run in a particular
93
- instance; we' ll cover that in the [ “Ignoring Some Tests Unless Specifically
92
+ It’ s possible to mark a test as ignored so it doesn’ t run in a particular
93
+ instance; we’ ll cover that in the [ “Ignoring Some Tests Unless Specifically
94
94
Requested”] [ ignoring ] <!-- ignore --> section later in this chapter. Because we
95
- haven' t done that here, the summary shows ` 0 ignored ` . We can also pass an
95
+ haven’ t done that here, the summary shows ` 0 ignored ` . We can also pass an
96
96
argument to the ` cargo test ` command to run only tests whose name matches a
97
- string; this is called filtering and we' ll cover that in the [ “Running a Subset
98
- of Tests by Name”] [ subset ] <!-- ignore --> section. We also haven’t filtered the
99
- tests being run, so the end of the summary shows ` 0 filtered out ` .
97
+ string; this is called * filtering* and we’ ll cover that in the [ “Running a
98
+ Subset of Tests by Name”] [ subset ] <!-- ignore --> section. We also haven’t
99
+ filtered the tests being run, so the end of the summary shows ` 0 filtered out ` .
100
100
101
101
The ` 0 measured ` statistic is for benchmark tests that measure performance.
102
102
Benchmark tests are, as of this writing, only available in nightly Rust. See
@@ -126,7 +126,7 @@ Then run `cargo test` again. The output now shows `exploration` instead of
126
126
{{#include ../listings/ch11-writing-automated-tests/no-listing-01-changing-test-name/output.txt}}
127
127
```
128
128
129
- Now we' ll add another test, but this time we’ll make a test that fails! Tests
129
+ Now we’ ll add another test, but this time we’ll make a test that fails! Tests
130
130
fail when something in the test function panics. Each test is run in a new
131
131
thread, and when the main thread sees that a test thread has died, the test is
132
132
marked as failed. In Chapter 9, we talked about how the simplest way to panic
@@ -470,8 +470,8 @@ too large.
470
470
{{#rustdoc_include ../listings/ch11-writing-automated-tests/listing-11-09/src/lib.rs:here}}
471
471
```
472
472
473
- <span class =" caption " >Listing 11-9: Testing for a ` panic! ` with a particular
474
- panic message </span >
473
+ <span class =" caption " >Listing 11-9: Testing for a ` panic! ` with a panic message
474
+ containing a specified substring </span >
475
475
476
476
This test will pass because the value we put in the ` should_panic ` attribute’s
477
477
` expected ` parameter is a substring of the message that the ` Guess::new `
0 commit comments