@@ -206,7 +206,7 @@ TEST_CASE("Fibonacci Domain", "[Fibonacci]")
206
206
CHECK_NOTHROW(fibonacci(10));
207
207
CHECK_THROWS_AS(fibonacci(-1), domain_error);
208
208
CHECK_THROWS_WITH(fibonacci(-1), "Fibonacci not defined for"
209
- "negative indices");
209
+ " negative indices");
210
210
}
211
211
```
212
212
@@ -399,7 +399,7 @@ template class Vector<int>;
399
399
400
400
so that `gcov` properly reports if we forget to test any member functions of our `Vector` class.
401
401
402
- As with Address Sanitizer and `gprof` , `gcov` requires some compile-time instrumentation.
402
+ As with Address Sanitizer ( and `gperftool`, which you'll see in a future chapter) , `gcov` requires some compile-time instrumentation.
403
403
Compile your test files with the `--coverage` flag.
404
404
405
405
Once you have compiled your tests, execute them as normal.
@@ -474,7 +474,7 @@ Typically, more code means more bugs; we do not want our unit tests to be comple
474
474
Tests should be obviously correct as much as is possible.
475
475
Start by testing basic functions, such as accessors and mutators.
476
476
Once those have been tested, you can use them in more complex functionality tests;
477
- if one of those tests fails, you know that the bug does lies somewhere other than your basic functions.
477
+ if one of those tests fails, you know that the bug does lie somewhere other than your basic functions.
478
478
479
479
If you come across a bug in your program, write a unit test that reproduces it,
480
480
then fix your code so that the test passes.
0 commit comments