Skip to content

Commit 9d08c58

Browse files
committed
Add tests. Correct path.
1 parent dd710d1 commit 9d08c58

File tree

5 files changed

+6
-12
lines changed

5 files changed

+6
-12
lines changed

pdal/plang/Redirector.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ PyObject* Redirector::init()
171171

172172
void Redirector::set_stdout(std::ostream* ostr)
173173
{
174-
stdout_write_type writeFunc = [ostr](std::string msg) { std::cerr << "Ostr = " << ostr << "!\n"; *ostr << msg; };
174+
stdout_write_type writeFunc = [ostr](std::string msg) { *ostr << msg; };
175175
stdout_flush_type flushFunc = [ostr]{ ostr->flush(); };
176176

177177
this->set_stdout(writeFunc, flushFunc);

pdal/test/PythonFilterTest.cpp

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -838,23 +838,17 @@ TEST(PLangTest, log)
838838
EXPECT_EQ(view->size(), 750u);
839839
}
840840

841-
if (FileUtils::fileExists(logfile))
842-
std::cerr << "File exists!\n";
843-
else
844-
std::cerr << "File doesn't exist!\n";
845-
/**
846841
bool ok = Support::compare_text_files(logfile,
847842
Support::datapath("logs/log_py.txt"));
848-
**/
849843

850844
// TODO: fails on Windows
851845
// unknown file: error: C++ exception with description "pdalboost::filesystem::remove:
852846
// The process cannot access the file because it is being used by another process:
853847
// "C:/projects/pdal/test/data/../temp/mylog_three.txt"" thrown in the test body.
854-
//if (ok)
855-
// FileUtils::deleteFile(Support::temppath("mylog_three.txt"));
848+
if (ok)
849+
FileUtils::deleteFile(Support::temppath("mylog_three.txt"));
856850

857-
// EXPECT_TRUE(ok);
851+
EXPECT_TRUE(ok);
858852
}
859853

860854

pdal/test/TestConfig.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
#ifndef UNITTEST_TESTCONFIG_INCLUDED
3636
#define UNITTEST_TESTCONFIG_INCLUDED
3737

38-
#define UNITTEST_TESTCONFIG_DATA_PATH "./pdal/test/data/"
39-
#define UNITTEST_TESTCONFIG_CONFIGURED_PATH "./pdal/test/data/"
38+
#define UNITTEST_TESTCONFIG_DATA_PATH "./test/data/"
39+
#define UNITTEST_TESTCONFIG_CONFIGURED_PATH "./test/data/"
4040
#define UNITTEST_TESTCONFIG_BINARY_PATH ""
4141
#define UNITTEST_TESTCONFIG_OCI_CONNECTION ""
4242

pdal/test/data/1.2-with-color.las

35.6 KB
Binary file not shown.

pdal/test/data/autzen-utm.las

36.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)