Skip to content

Commit b2694ea

Browse files
committed
Few edits
1 parent fa0ca85 commit b2694ea

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

08-Unit-testing.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ TEST_CASE("Fibonacci Domain", "[Fibonacci]")
206206
CHECK_NOTHROW(fibonacci(10));
207207
CHECK_THROWS_AS(fibonacci(-1), domain_error);
208208
CHECK_THROWS_WITH(fibonacci(-1), "Fibonacci not defined for"
209-
"negative indices");
209+
" negative indices");
210210
}
211211
```
212212

@@ -399,7 +399,7 @@ template class Vector<int>;
399399
400400
so that `gcov` properly reports if we forget to test any member functions of our `Vector` class.
401401
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.
403403
Compile your test files with the `--coverage` flag.
404404
405405
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
474474
Tests should be obviously correct as much as is possible.
475475
Start by testing basic functions, such as accessors and mutators.
476476
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.
478478
479479
If you come across a bug in your program, write a unit test that reproduces it,
480480
then fix your code so that the test passes.

0 commit comments

Comments
 (0)