Skip to main content
Share Your Experience: Take the 2024 Developer Survey
6 votes
Accepted

C++ Mock Library: Part 1

Macros are difficult Your code relies on macros, and macros are notoriously difficult to work with if you go beyond the simple #define CONSTANT and ...
G. Sliepen's user avatar
  • 57.1k
4 votes
Accepted

C++ Mock Library: Part 2

Write it in C++ The script is something I would cobble together as well when I would start working out this problem. However, it is nice for rapid prototyping, but it's actually terrible. It's not ...
G. Sliepen's user avatar
  • 57.1k
3 votes
Accepted

Track and trace allocations

Missing thread-safety The default allocator is thread-safe, and custom allocators might also be. So for your allocator adapters to not destroy the thread-safety, you need to make sure you handle that ...
G. Sliepen's user avatar
  • 57.1k
3 votes

C++ Mock Library: Part 4

I only have some minor remarks on the implementation. There are 2 commented-out lines in there: ...
Mast's user avatar
  • 13.4k
2 votes
Accepted

C++ Mock Library: Part 3

I can see how this can simplify some tests. The code looks also quite clean. However, I'm a bit worried about whether you should go this way. Here's why: About testing how a function is implemented I ...
G. Sliepen's user avatar
  • 57.1k

Only top scored, non community-wiki answers of a minimum length are eligible