I have a native C++ unit test project in Visual Studio (2012).
In one of my tests I would like to read a file included in my unit test project. Is it possible? What properties of the file should I set and what path should I use?
I added a test.txt file to my project (and tried to set its Content property to true). And in a unit test I tried to open the file with a relative path like this:
std::ifstream file("text.txt");
But it does not work.
I guess the file should be copied to the place from where the unit test runs. Is there a simple solution for this?