Unit testing for Zephyr using C++

I am unable to run tests using a main.cpp file.
It seems to build test fine if I use main.c.
Minimal example available at

Just rename src/main.c to src/main.cpp to reproduce the error.

The issue I get is the same I get if the framework Zephyr is not included properly.

Interesting that a file(extension) in src/ affects compilation in the unit test mode, when the test mode isn’t supposed to compile in the src/ folder at all (standard setting test_build_project_src is no). Not sure what’s going on here. Maybe @valeros can have a look at this.