Mocking C++
Offered By: CppNow via YouTube
Course Description
Overview
Explore mocking techniques in C++ for efficient unit testing in this conference talk from C++Now 2017. Learn how to create mock components that simulate desired behaviors without relying on actual dependencies, improving test reliability and speed. Discover methods to implement mocking in C++ without extensive use of macros, manual labor, or code duplication, challenging the notion that C++ lacks the necessary capabilities. Gain insights into advanced topics such as virtual functions, marking frameworks, and handling complex scenarios like throwing destructors and virtual inheritance. Understand the advantages and limitations of mocking in C++, and how to effectively apply these techniques to enhance your unit testing practices.
Syllabus
Intro
Marking
Mark Objects
Manual Approach
Virtual Functions
Advantages
Alternatives
Unit Tests
Marking Framework
Limitations
My malloc is not your malloc
Test code
Throwing destructor
Virtual inheritance
Callback reporting
Reify function
Update lambda
Explicit lambda
Feedback framework
Taught by
CppNow
Related Courses
Your Favorite Undefined Behavior in C++CppNow via YouTube Under the Hood - Assembly, System Calls, and Hardware in C++
CppNow via YouTube Carbon Language Successor Strategy - From C++ Interop to Memory Safety
CppNow via YouTube Value Oriented Programming Part 1 - You Say You Want to Write a Function
CppNow via YouTube Introducing a Memory-Safe Successor Language in Large C++ Code Bases
CppNow via YouTube