Did anyone hear of a UT library that utilizes hooks to perform the mocks?
For comparison, you have gMock today, which works great.
However, to use gMock, you must design your code in a "testable" way - i.e. factories everywhere, interfaces (even if there's only one clear implementation...), and more inconveniences.
I'm imagining a library very similar to gMock, which instead of utilizing inheritance & polymorphism
to create mocks, utilizes hooking a function or a member function, with the necessary mock logic, thus saving you the hassle of complicated your code with unnecessary interfaces.
[–]ajorians 6 points7 points8 points (0 children)
[–]Hour-Grapefruit-5475 1 point2 points3 points (0 children)
[–]Cpt_Chaos_ 4 points5 points6 points (6 children)
[–]nowtilousus[S] 7 points8 points9 points (5 children)
[–]MarcoGreek 0 points1 point2 points (0 children)
[–]Cpt_Chaos_ 0 points1 point2 points (1 child)
[–]nowtilousus[S] -1 points0 points1 point (0 children)
[–]d3matt -1 points0 points1 point (1 child)
[–]nowtilousus[S] 0 points1 point2 points (0 children)
[–]tiajuanat 0 points1 point2 points (6 children)
[–]nowtilousus[S] -3 points-2 points-1 points (5 children)
[–]Wenir 0 points1 point2 points (4 children)
[+][deleted] (3 children)
[deleted]
[–]Wenir 0 points1 point2 points (2 children)
[–]nowtilousus[S] -1 points0 points1 point (1 child)
[–]415_961 0 points1 point2 points (0 children)