Pio test doesn't build my tests

Hi, I’m using platformIO core 4.0 on Windows 7.

I’m developing a library for Arduino mega2560 so that declarations of classes and methods are at header (.hpp) files, and definitions for these methods and classes are at .cpp files.
Although I can build and run the program in my avr (board), I can’t build the tests.

This is my platformio.ini file:

[env:megaatmega2560]
platform = atmelavr
board = megaatmega2560
framework = arduino

Header files are within ‘include’ folder, and source files are within ‘src’ folder.

When I run “pio test -v”, I get the following: output.log

What’s the problem? Is it a bug in platformio core? Or
am I doing something wrong?

Ok. I’m sorry.
The answer for such a question is here https://docs.platformio.org/en/latest/plus/unit-testing.html#shared-code

I have put the headers and sources files into the lib_dir. It solves the problem.

Thanks.