mirror of
https://github.com/jhasse/poly2tri.git
synced 2025-01-03 16:33:31 +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
|
# Visual Studio Code
|
||||||
/.vscode/*cache*
|
/.vscode/*cache*
|
||||||
|
/.ccls-cache/
|
||||||
|
/compile_commands.json
|
||||||
|
@ -46,10 +46,9 @@ BOOST_AUTO_TEST_CASE(TestbedFilesTest)
|
|||||||
// Load pointset from file
|
// Load pointset from file
|
||||||
// Parse and tokenize data file
|
// Parse and tokenize data file
|
||||||
std::string line;
|
std::string line;
|
||||||
std::ifstream myfile(std::string("../testbed/data/") + filename);
|
const std::string src(__FILE__); // ../unittest/main.cpp
|
||||||
if (!myfile.is_open()) {
|
auto folder = src.substr(0, src.find_last_of('/')) + "/../testbed/data/";
|
||||||
myfile.open(std::string("testbed/data/") + filename);
|
std::ifstream myfile(folder + filename);
|
||||||
}
|
|
||||||
BOOST_REQUIRE(myfile.is_open());
|
BOOST_REQUIRE(myfile.is_open());
|
||||||
while (!myfile.eof()) {
|
while (!myfile.eof()) {
|
||||||
getline(myfile, line);
|
getline(myfile, line);
|
||||||
|
Loading…
Reference in New Issue
Block a user