etl icon indicating copy to clipboard operation
etl copied to clipboard

Change unit test framework to Google Test

Open jwellbelove opened this issue 1 year ago • 4 comments

The current UnitTest++ framework no longer appears to be maintained and the ETL's fork has been customised to update it to be compatible with current C++ versions. I propose updating the unit test framework to the more mainstream Google Test.

jwellbelove avatar Mar 15 '23 10:03 jwellbelove

Unfortunately there does not seem to be any proper integration with VS2022 build output windows, making it a bit of a non-starter for me.

jwellbelove avatar Mar 15 '23 12:03 jwellbelove

OK, it seems that to get the output to appear in the IDE's output window you must redirect the unit test output to std::err

i.e. etl.exe 1>&2

jwellbelove avatar Mar 15 '23 15:03 jwellbelove

OK, it seems that to get the output to appear in the IDE's output window you must redirect the unit test output to std::err

i.e. etl.exe 1>&2

This is what I found as well. We use googletest to test our embedded architecture. Using VSCode on Windows, I could only print with std::cerr in my googletests; I haven't tried on linux yet if that's the same case. So I don't think it's just a VS2022. Think it's more of a googletest thing?

drewr95 avatar Mar 16 '23 09:03 drewr95

Think it's more of a googletest thing?

Yes. I saw an old issue raised on the googletest GitHub page that asked for the output to go to std::cerr instead of std::cout (for the reasons we have discovered), but the change was rejected and the redirect was suggested instead.

jwellbelove avatar Mar 16 '23 09:03 jwellbelove