You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I use ETL in an embedded project. GoogleTest is used for software testing. There is now a major problem with etl::delegate and gmock when implementing a test.
Unfortunately, many type traits are next to impossible for the ETL to reverse engineer due to the reliance on the compiler's 'insider knowledge'.
The only way to use your fix would be to only enable it if the STL is being used. #if ETL_USING_STL
The following does work for unittests:
EXPECT_CALL(mockedHardwareSensor, attachSensorCallback(_)).Times(Exactly(1)).WillOnce(
Invoke( [&newSensorValueCallback](auto& cb){ newSensorValueCallback = Callback::create(cb); return 0; }
);
Hello, I use ETL in an embedded project. GoogleTest is used for software testing. There is now a major problem with etl::delegate and gmock when implementing a test.
The Test:
The Compiler Output (In German)
The problem is that the wrong delegate constructors are being called.
To fix the problem I have added a std::is_invocable_r check to the constructors
The quick fix
So the question now is how I should deal with the problem in the long term.
Best regards and sorry for my bad English
Nico
The text was updated successfully, but these errors were encountered: