Re: [edk2-devel] Problems mocking UEFI Protocol in gMock

2023-09-29 Thread CrossedCarpet
Greetings, A week long collaboration between me and GDB, figuring out how to reproduce my CounterProtocol with function arguments, made me reach the conclusion that mocking a UEFI protocol is indeed documented and the solution had to do with copying the style of a global table Mock. This is the

Re: [edk2-devel] Problems mocking UEFI Protocol in gMock

2023-09-22 Thread CrossedCarpet
Greetings, A week long collaboration between me and Gpt yielded this functioning mock of a sample UEFI Protocol: struct SampleProtocol { INTN    (*GetVersion)( ); }; struct MockSampleProtocol : public SampleProtocol { static MockSampleProtocol    *instance; MockSampleProtocol ( ) { // Assign th