@@ -580,8 +580,6 @@ TEST(MyDeathTest, CompoundStatement) {
580
580
}
581
581
```
582
582
583
- gtest-death-test_test.cc contains more examples if you are interested.
584
-
585
583
## I have a fixture class `FooTest`, but `TEST_F(FooTest, Bar)` gives me error ``"no matching function for call to `FooTest::FooTest()'"``. Why?
586
584
587
585
Googletest needs to be able to create objects of your test fixture class, so it
@@ -663,14 +661,15 @@ break the death test (e.g. by changing the regex pattern it is expected to
663
661
match). Admittedly, this is a hack. We'll consider a more permanent solution
664
662
after the fork-and-exec-style death tests are implemented.
665
663
666
- ## The compiler complains about " no match for 'operator<<'" when I use an assertion. What gives?
664
+ ## The compiler complains about ` no match for 'operator<<'` when I use an assertion. What gives?
667
665
668
666
If you use a user-defined type `FooType` in an assertion, you must make sure
669
667
there is an `std::ostream& operator<<(std::ostream&, const FooType&)` function
670
668
defined such that we can print a value of `FooType`.
671
669
672
670
In addition, if `FooType` is declared in a name space, the `<<` operator also
673
- needs to be defined in the *same* name space. See abseil.io/tips/49 for details.
671
+ needs to be defined in the *same* name space. See
672
+ [Tip of the Week #49](http://abseil.io/tips/49) for details.
674
673
675
674
## How do I suppress the memory leak messages on Windows?
676
675
@@ -691,10 +690,10 @@ mistake in production. Such cleverness also leads to
691
690
advise against the practice, and googletest doesn't provide a way to do it.
692
691
693
692
In general, the recommended way to cause the code to behave differently under
694
- test is [Dependency Injection](https ://en.wikipedia.org/wiki/Dependency_injection). You can inject
693
+ test is [Dependency Injection](http ://en.wikipedia.org/wiki/Dependency_injection). You can inject
695
694
different functionality from the test and from the production code. Since your
696
695
production code doesn't link in the for-test logic at all (the
697
- [`testonly`](https ://docs.bazel.build/versions/master/be/common-definitions.html#common.testonly) attribute for BUILD targets helps to ensure
696
+ [`testonly`](http ://docs.bazel.build/versions/master/be/common-definitions.html#common.testonly) attribute for BUILD targets helps to ensure
698
697
that), there is no danger in accidentally running it.
699
698
700
699
However, if you *really*, *really*, *really* have no choice, and if you follow
0 commit comments