Skip to content

Commit

Permalink
Remove boost::filesystem from utest files
Browse files Browse the repository at this point in the history
  • Loading branch information
boxanm committed Aug 11, 2024
1 parent 59c84b0 commit ac881af
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion utest/ui/IO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ class IOLoadSaveTest : public testing::Test

virtual void TearDown()
{
EXPECT_TRUE(boost::filesystem::remove(boost::filesystem::path(testFileName)));
EXPECT_TRUE(std::filesystem::remove(std::filesystem::path(testFileName)));
}


Expand Down
8 changes: 4 additions & 4 deletions utest/ui/Loggers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ TEST(Loggers, FileLogger)

fileLog.reset(); // The logger needs to release the files to allow them to be removed

EXPECT_TRUE(boost::filesystem::remove(boost::filesystem::path(infoFileName)));
EXPECT_TRUE(boost::filesystem::remove(boost::filesystem::path(warningFileName)));
EXPECT_TRUE(std::filesystem::remove(std::filesystem::path(infoFileName)));
EXPECT_TRUE(std::filesystem::remove(std::filesystem::path(warningFileName)));
}

TEST(Loggers, FileLoggerInfoToConsole)
Expand Down Expand Up @@ -65,7 +65,7 @@ TEST(Loggers, FileLoggerInfoToFile)

fileLog.reset(); // The logger needs to release the file to allow it to be removed

EXPECT_TRUE(boost::filesystem::remove(boost::filesystem::path(infoFileName)));
EXPECT_TRUE(std::filesystem::remove(std::filesystem::path(infoFileName)));
}

TEST(Loggers, FileLoggerWarningToFile)
Expand All @@ -84,5 +84,5 @@ TEST(Loggers, FileLoggerWarningToFile)

fileLog.reset(); // The logger needs to release the file to allow it to be removed

EXPECT_TRUE(boost::filesystem::remove(boost::filesystem::path(warningFileName)));
EXPECT_TRUE(std::filesystem::remove(std::filesystem::path(warningFileName)));
}
10 changes: 5 additions & 5 deletions utest/ui/icp/GeneralTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ TEST(icpTest, icpTest)
DP ref = DP::load(dataPath + "cloud.00000.vtk");
DP data = DP::load(dataPath + "cloud.00001.vtk");

namespace fs = boost::filesystem;
namespace fs = std::filesystem;
fs::path config_dir(dataPath + "icp_data");
EXPECT_TRUE( fs::exists(config_dir) && fs::is_directory(config_dir) );

Expand All @@ -85,7 +85,7 @@ TEST(icpTest, icpTest)
// Load config file, and form ICP object
PM::ICP icp;
std::string config_file = d->path().string();
if (fs::extension(config_file) != ".yaml") continue;
if (d->path().extension().string() != ".yaml") continue;
std::ifstream ifs(config_file.c_str());
EXPECT_NO_THROW(icp.loadFromYaml(ifs)) << "This error was caused by the test file:" << endl << " " << config_file;

Expand Down Expand Up @@ -174,7 +174,7 @@ TEST(icpTest, icpSingular)

PM::ICP icp;
std::string config_file = dataPath + "default-identity.yaml";
EXPECT_TRUE(boost::filesystem::exists(config_file));
EXPECT_TRUE(std::filesystem::exists(config_file));

std::ifstream ifs(config_file.c_str());
EXPECT_NO_THROW(icp.loadFromYaml(ifs)) << "This error was caused by the test file:" << endl << " " << config_file;
Expand All @@ -198,7 +198,7 @@ TEST(icpTest, icpIdentity)

PM::ICP icp;
std::string config_file = dataPath + "default-identity.yaml";
EXPECT_TRUE(boost::filesystem::exists(config_file));
EXPECT_TRUE(std::filesystem::exists(config_file));

std::ifstream ifs(config_file.c_str());
EXPECT_NO_THROW(icp.loadFromYaml(ifs)) << "This error was caused by the test file:" << endl << " " << config_file;
Expand All @@ -218,7 +218,7 @@ TEST(icpTest, similarityTransform)

PM::ICP icp;
std::string config_file = dataPath + "icp_data/defaultSimilarityPointToPointMinDistDataPointsFilter.yaml";
EXPECT_TRUE(boost::filesystem::exists(config_file));
EXPECT_TRUE(std::filesystem::exists(config_file));

std::ifstream ifs(config_file.c_str());
EXPECT_NO_THROW(icp.loadFromYaml(ifs)) << "This error was caused by the test file:" << endl << " " << config_file;
Expand Down
4 changes: 1 addition & 3 deletions utest/utest.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
#include <string>
#include <fstream>

#include "boost/filesystem.hpp"
#include "boost/filesystem/path.hpp"
#include "boost/filesystem/operations.hpp"
#include <filesystem>

typedef double NumericType;
typedef PointMatcher<NumericType> PM;
Expand Down

0 comments on commit ac881af

Please sign in to comment.