ETLCPP / etl

Embedded Template Library
https://www.etlcpp.com
MIT License
2.24k stars 393 forks source link

Change unit test framework to Google Test #677

Open jwellbelove opened 1 year ago

jwellbelove commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

drewr95 commented 1 year ago

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?

jwellbelove commented 1 year ago

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.