Closed cesenaLA closed 1 month ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 99.09%. Comparing base (
8f36c45
) to head (fd94c04
). Report is 2 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I'm a bit confused by this. It solves a much more specific problem than the issue you originally opened. Is there a reason for limiting the support to only ´STDMETHOD`?
The change is good, BTW. Very good! Especially the docs and the extended test suite.
Yes, the scope of the PR was reduced to only handle STDMETHOD
, use when implementing COM interfaces on windows (which is our use case) based on the comment from @puetzk https://github.com/rollbear/trompeloeil/issues/329#issuecomment-2036157088
Adds new
IMPLEMENT_STDMETHOD_MOCKn
andMAKE_STDMETHOD_MOCKn
to allow to mock COM interfaces declared usingSTDMETHOD(name)
i.e.virtual HRESULT __stdcall name (...).
As .idl/.tlb do not support cvref-qualified methods, so there's no need for all the permutations ofSTDMETHODCALLTYPE
vs const/volatile/rvalue/etc.The new macros are implemented by extending
TROMPELOEIL_MAKE_MOCK_
to take a calling convention and placing it in the correct location allowed by the microsoft compiler. This also means that the new macros only work on Windows.It also add tests and documentation for the new macros.
Closes #329