[Liblas-commits] hg-main-tree: more path tweaking to get things right

liblas-commits at liblas.org liblas-commits at liblas.org
Thu Aug 11 16:44:49 EDT 2011


details:   http://hg.libpc.orghg-main-tree/rev/3f726f194642
changeset: 1047:3f726f194642
user:      Howard Butler <hobu.inc at gmail.com>
date:      Thu Aug 11 15:44:34 2011 -0500
description:
more path tweaking to get things right
Subject: hg-main-tree: merge

details:   http://hg.libpc.orghg-main-tree/rev/d5ffbe6df136
changeset: 1048:d5ffbe6df136
user:      Howard Butler <hobu.inc at gmail.com>
date:      Thu Aug 11 15:44:45 2011 -0500
description:
merge

diffstat:

 test/unit/FileUtilsTest.cpp    |   4 ++--
 test/unit/LasWriterTest.cpp    |   5 +++--
 test/unit/LiblasWriterTest.cpp |  18 ++++++++++--------
 3 files changed, 15 insertions(+), 12 deletions(-)

diffs (97 lines):

diff -r 8d9ffb4b7c81 -r d5ffbe6df136 test/unit/FileUtilsTest.cpp
--- a/test/unit/FileUtilsTest.cpp	Thu Aug 11 15:31:49 2011 -0500
+++ b/test/unit/FileUtilsTest.cpp	Thu Aug 11 15:44:45 2011 -0500
@@ -132,11 +132,11 @@
 {
     // test absolute case
     const std::string a = FileUtils::getDirectory(drive + "/a/b/foo.txt");
-    BOOST_CHECK(a == drive+"/a/b");
+    BOOST_CHECK_EQUAL(a, drive+"/a/b");
 
     // test relative case
     const std::string b = FileUtils::getDirectory("a/b/foo.txt");
-    BOOST_CHECK(b == "a/b");
+    BOOST_CHECK_EQUAL(b, "a/b");
 
     return;
 }
diff -r 8d9ffb4b7c81 -r d5ffbe6df136 test/unit/LasWriterTest.cpp
--- a/test/unit/LasWriterTest.cpp	Thu Aug 11 15:31:49 2011 -0500
+++ b/test/unit/LasWriterTest.cpp	Thu Aug 11 15:44:45 2011 -0500
@@ -122,12 +122,13 @@
         pdal::drivers::las::LasReader reader(Support::datapath("laszip/LasWriterTest_test_simple_laz.laz"));
     }
 
-    bool filesSame = Support::compare_files(Support::datapath("laszip/LasWriterTest_test_simple_laz.laz"), Support::datapath("laszip/laszip-generated.laz"));
+    bool filesSame = Support::compare_files(Support::datapath("laszip/LasWriterTest_test_simple_laz.laz"), 
+                                            Support::datapath("laszip/laszip-generated.laz"));
     BOOST_CHECK(filesSame);
 
     if (filesSame)
     {
-        FileUtils::deleteFile("LasWriterTest_test_simple_laz.laz");
+        FileUtils::deleteFile(Support::datapath("laszip/LasWriterTest_test_simple_laz.laz"));
     }
 
     return;
diff -r 8d9ffb4b7c81 -r d5ffbe6df136 test/unit/LiblasWriterTest.cpp
--- a/test/unit/LiblasWriterTest.cpp	Thu Aug 11 15:31:49 2011 -0500
+++ b/test/unit/LiblasWriterTest.cpp	Thu Aug 11 15:44:45 2011 -0500
@@ -92,9 +92,9 @@
 BOOST_AUTO_TEST_CASE(LiblasWriterTest_test_options)
 {
     // remove file from earlier run, if needed
-    FileUtils::deleteFile("LiblasWriterTest_test_options.las");
+    FileUtils::deleteFile(Support::datapath("LiblasWriterTest_test_options.las"));
 
-    Option<std::string> opt("filename", "LiblasWriterTest_test_options.las");
+    Option<std::string> opt("filename", Support::datapath("LiblasWriterTest_test_options.las"));
     Options opts(opt);
 
     LiblasReader reader(Support::datapath("1.2-with-color.las"));
@@ -116,12 +116,13 @@
         writer.write(numPoints);
     }
 
-    bool filesSame = Support::compare_files("LiblasWriterTest_test_options.las", Support::datapath("simple.las"));
+    bool filesSame = Support::compare_files(Support::datapath("LiblasWriterTest_test_options.las"), 
+                                            Support::datapath("simple.las"));
     BOOST_CHECK(filesSame);
 
     if (filesSame)
     {
-        FileUtils::deleteFile("LiblasWriterTest_test_options.las");
+        FileUtils::deleteFile(Support::datapath("LiblasWriterTest_test_options.las"));
     }
 
     return;
@@ -131,11 +132,11 @@
 BOOST_AUTO_TEST_CASE(LiblasWriterTest_test_simple_laz)
 {
     // remove file from earlier run, if needed
-    FileUtils::deleteFile("laszip/LiblasWriterTest_test_simple_laz.las");
+    FileUtils::deleteFile(Support::datapath("laszip/LiblasWriterTest_test_simple_laz.laz"));
 
     LiblasReader reader(Support::datapath("laszip/basefile.las"));
     
-    std::ostream* ofs = FileUtils::createFile("laszip/LiblasWriterTest_test_simple_laz.laz");
+    std::ostream* ofs = FileUtils::createFile(Support::datapath("laszip/LiblasWriterTest_test_simple_laz.laz"));
 
     {
         // need to scope the writer, so that's it dtor can use the stream
@@ -155,12 +156,13 @@
 
     FileUtils::closeFile(ofs);
 
-    bool filesSame = Support::compare_files("laszip/LiblasWriterTest_test_simple_laz.laz", Support::datapath("laszip/laszip-generated.laz"));
+    bool filesSame = Support::compare_files(Support::datapath("laszip/LiblasWriterTest_test_simple_laz.laz"), 
+                                            Support::datapath("laszip/laszip-generated.laz"));
     BOOST_CHECK(filesSame);
 
     if (filesSame)
     {
-        FileUtils::deleteFile("laszip/LiblasWriterTest_test_simple_laz.laz");
+        FileUtils::deleteFile(Support::datapath("laszip/LiblasWriterTest_test_simple_laz.laz"));
     }
 
     return;


More information about the Liblas-commits mailing list