I have a C++ project I am working on and I have to write Unit tests for it. It's a video game-like project so I am using SFML as my base. I tried using the Native Unit Test framework and the Google Test framework, but I always get stuck at the same point. Whenever I try to create an object that uses anything from the SFML library, the tests immediately fail. In the case of the Native Unit Test when I try to run the tests they fail with the message:
Failed to set up the execution context to run the test
In the case of Google Test, the test discovery fails to find the tests at all. The test discovery produces this output:
ERROR: Could not list test cases for executable 'C:\Users\User\Desktop\Enigma\finished\Release\EnigmaTest.exe': process execution failed with exit code -1073741515
I have set the project properties to be the exact same as the project I am testing and I have copies of the required DLL dependencies in the folder of the test project. Any ideas on what the problem could be?
I am using Visual Studio 2019 btw.
I fixed this by adding the bin directory (C:\SFML-2.5.1\bin) of the SFML library in the Path environment variable