You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
1.1 KiB

2 months ago
  1. # Googletest Samples
  2. If you're like us, you'd like to look at
  3. [googletest samples.](https://github.com/google/googletest/tree/master/googletest/samples)
  4. The sample directory has a number of well-commented samples showing how to use a
  5. variety of googletest features.
  6. * Sample #1 shows the basic steps of using googletest to test C++ functions.
  7. * Sample #2 shows a more complex unit test for a class with multiple member
  8. functions.
  9. * Sample #3 uses a test fixture.
  10. * Sample #4 teaches you how to use googletest and `googletest.h` together to
  11. get the best of both libraries.
  12. * Sample #5 puts shared testing logic in a base test fixture, and reuses it in
  13. derived fixtures.
  14. * Sample #6 demonstrates type-parameterized tests.
  15. * Sample #7 teaches the basics of value-parameterized tests.
  16. * Sample #8 shows using `Combine()` in value-parameterized tests.
  17. * Sample #9 shows use of the listener API to modify Google Test's console
  18. output and the use of its reflection API to inspect test results.
  19. * Sample #10 shows use of the listener API to implement a primitive memory
  20. leak checker.