Google Test and Mock Platform - Part 2: GMock Matchers

Опубликовано: 20 Май 2026
на канале: arisaif
28,008
252

In this video, we cover GMock matchers. This is the second video in the video series of a complete tutorial on Google Test (GTest) and Google Mock (GMock) for writing unit tests in C++.

Chapters:

Introduction 00:00
Accompanying repo: 00:53
GMock matchers and EXPACT_THAT: 01:37
How to run examples using Bazel: 03:26
A more interesting example: 04:44
Why should we use matchers? 06:48
Comparison matchers: 08:42
Reference matchers: 09:53
Wildcard and underscore matchers: 11:14
Optional matchers: 12:23
Wildcard and underscore matcher: 11:14
String matchers: 15:02
Floating-point matchers: 16:55
Composite matchers: 19:31
Container matchers: 22:46
Member matchers: 28:22
Container matchers: 22:46
Pointer matchers: 34:06
Container matchers: 22:46
Predicates and GMock Truly: 44:59
Custom matchers: 46:23


Let me know if you have any questions in the comments!

-----------------------------------------------------
Link to Part 1:    • Google Test and Mock Platform, Complete Tu...  
Link to the repo used in this video: https://github.com/ourarash/cpp-template.
A video describing how to use this repo:    • C++ starter repo for Bazel & Visual Studio...  
-----------------------------------------------------
See my other videos on:
How to use Google Benchmark for C++ Programs:    • How to use Google Benchmark for C++ programs  
Bazel and unit tests with GTest:    • Bazel & Google Test in Visual Studio Code  
Debugging in Visual Studio Code for C++:    • Debugging C++ in Visual Studio Code using ...  
Visual Studio Code, Top Features:    • Visual Studio Code Top Features 2020  
-----------------------------------------------------
Keep in touch with me:
  / ourarash  
  / ourarash  

I'm the founder of BitcoinCrazyness app, the Most Advanced Cryptocurrency mobile APP for alerts, Check it out:

http://www.bitcoincrazyness.com/