[Liblas-commits] libpc: clean up test target invocation
liblas-commits at liblas.org
liblas-commits at liblas.org
Tue Mar 1 16:08:22 EST 2011
details: http://hg.liblas.orglibpc/rev/895a67d02b2a
changeset: 142:895a67d02b2a
user: Howard Butler <hobu.inc at gmail.com>
date: Tue Mar 01 15:08:10 2011 -0600
description:
clean up test target invocation
Subject: libpc: merge
details: http://hg.liblas.orglibpc/rev/6f9eedc7ae16
changeset: 143:6f9eedc7ae16
user: Howard Butler <hobu.inc at gmail.com>
date: Tue Mar 01 15:08:17 2011 -0600
description:
merge
diffstat:
apps/Application.cpp | 17 +++++++++--------
test/unit/CMakeLists.txt | 2 +-
test/unit/LiblasWriterTest.cpp | 2 +-
test/unit/support.cpp | 4 ++--
4 files changed, 13 insertions(+), 12 deletions(-)
diffs (83 lines):
diff -r 4ad79c07c12b -r 6f9eedc7ae16 apps/Application.cpp
--- a/apps/Application.cpp Tue Mar 01 11:36:02 2011 -0800
+++ b/apps/Application.cpp Tue Mar 01 15:08:17 2011 -0600
@@ -64,14 +64,6 @@
// parse the command line
parseOptions();
- // do any user-level sanity checking
- bool happy = validateOptions();
- if (!happy)
- {
- outputHelp();
- return 1;
- }
-
// handle the well-known options
if (hasOption("version"))
{
@@ -85,6 +77,14 @@
return 0;
}
+ // do any user-level sanity checking
+ bool happy = validateOptions();
+ if (!happy)
+ {
+ outputHelp();
+ return 1;
+ }
+
boost::timer timer;
// call derived function
@@ -141,6 +141,7 @@
{
const po::options_description* options = *iter;
std::cout << *options;
+ std::cout << std::endl;
}
std::cout <<"\nFor more information, see the full documentation for libPC at:\n";
diff -r 4ad79c07c12b -r 6f9eedc7ae16 test/unit/CMakeLists.txt
--- a/test/unit/CMakeLists.txt Tue Mar 01 11:36:02 2011 -0800
+++ b/test/unit/CMakeLists.txt Tue Mar 01 15:08:17 2011 -0600
@@ -53,4 +53,4 @@
${GDAL_LIBRARY}
${SPATIALINDEX_LIBRARY})
-ADD_TEST(libpc_test ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/libpc_test ${CMAKE_SOURCE_DIR}/test/data)
+ADD_TEST(libpc_test ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/libpc_test)
diff -r 4ad79c07c12b -r 6f9eedc7ae16 test/unit/LiblasWriterTest.cpp
--- a/test/unit/LiblasWriterTest.cpp Tue Mar 01 11:36:02 2011 -0800
+++ b/test/unit/LiblasWriterTest.cpp Tue Mar 01 15:08:17 2011 -0600
@@ -86,7 +86,7 @@
return;
}
-BOOST_AUTO_TEST_CASE(test_test_simple_laz)
+BOOST_AUTO_TEST_CASE(test_simple_laz)
{
// remove file from earlier run, if needed
Utils::deleteFile("temp.las");
diff -r 4ad79c07c12b -r 6f9eedc7ae16 test/unit/support.cpp
--- a/test/unit/support.cpp Tue Mar 01 11:36:02 2011 -0800
+++ b/test/unit/support.cpp Tue Mar 01 15:08:17 2011 -0600
@@ -44,7 +44,7 @@
bool compare_files(const std::string& file1, const std::string& file2)
{
uintmax_t len1x = libpc::Utils::fileSize(file1);
- uintmax_t len2x = libpc::Utils::fileSize(file1);
+ uintmax_t len2x = libpc::Utils::fileSize(file2);
size_t len1 = (size_t)len1x; // BUG
size_t len2 = (size_t)len2x;
@@ -62,7 +62,7 @@
char* buf2 = new char[len2];
str1->read(buf1,len1);
- str2->read (buf2,len2);
+ str2->read(buf2,len2);
libpc::Utils::closeFile(str1);
libpc::Utils::closeFile(str2);
More information about the Liblas-commits
mailing list