mirror of
https://github.com/jhasse/poly2tri.git
synced 2024-11-05 22:09:52 +01:00
Create path for TestbedFilesTest relative to build folder
This commit is contained in:
parent
0898bb217d
commit
3a2db01407
2
.gitignore
vendored
2
.gitignore
vendored
@ -9,3 +9,5 @@ build/
|
||||
|
||||
# Visual Studio Code
|
||||
/.vscode/*cache*
|
||||
/.ccls-cache/
|
||||
/compile_commands.json
|
||||
|
@ -46,10 +46,9 @@ BOOST_AUTO_TEST_CASE(TestbedFilesTest)
|
||||
// Load pointset from file
|
||||
// Parse and tokenize data file
|
||||
std::string line;
|
||||
std::ifstream myfile(std::string("../testbed/data/") + filename);
|
||||
if (!myfile.is_open()) {
|
||||
myfile.open(std::string("testbed/data/") + filename);
|
||||
}
|
||||
const std::string src(__FILE__); // ../unittest/main.cpp
|
||||
auto folder = src.substr(0, src.find_last_of('/')) + "/../testbed/data/";
|
||||
std::ifstream myfile(folder + filename);
|
||||
BOOST_REQUIRE(myfile.is_open());
|
||||
while (!myfile.eof()) {
|
||||
getline(myfile, line);
|
||||
|
Loading…
Reference in New Issue
Block a user