[Liblas-commits] hg-main-tree: add some app tests that actually work

liblas-commits at liblas.org liblas-commits at liblas.org
Mon Aug 15 15:22:09 EDT 2011


details:   http://hg.libpc.orghg-main-tree/rev/4c606c33b9c6
changeset: 1098:4c606c33b9c6
user:      mpg
date:      Mon Aug 15 12:21:54 2011 -0700
description:
add some app tests that actually work

diffstat:

 test/unit/pc2pcTest.cpp      |  18 +++++++++++++++++-
 test/unit/pcinfoTest.cpp     |  18 +++++++++++++++++-
 test/unit/pcpipelineTest.cpp |  19 ++++++++++++++++++-
 3 files changed, 52 insertions(+), 3 deletions(-)

diffs (101 lines):

diff -r 19e41307eaa8 -r 4c606c33b9c6 test/unit/pc2pcTest.cpp
--- a/test/unit/pc2pcTest.cpp	Mon Aug 15 12:15:08 2011 -0700
+++ b/test/unit/pc2pcTest.cpp	Mon Aug 15 12:21:54 2011 -0700
@@ -53,7 +53,7 @@
 
 
 #ifdef PDAL_COMPILER_MSVC
-BOOST_AUTO_TEST_CASE(pc2pcTest_test1)
+BOOST_AUTO_TEST_CASE(pc2pcTest_test_no_input)
 {
     const std::string cmd = appName();
 
@@ -68,4 +68,20 @@
 }
 #endif
 
+
+BOOST_AUTO_TEST_CASE(pc2pcTest_test_common_opts)
+{
+    const std::string cmd = appName();
+
+    std::string output;
+    int stat = Support::run_command(cmd + " -h", output);
+    BOOST_CHECK_EQUAL(stat, 0);
+
+    stat = Support::run_command(cmd + " --version", output);
+    BOOST_CHECK_EQUAL(stat, 0);
+
+    return;
+}
+
 BOOST_AUTO_TEST_SUITE_END()
+
diff -r 19e41307eaa8 -r 4c606c33b9c6 test/unit/pcinfoTest.cpp
--- a/test/unit/pcinfoTest.cpp	Mon Aug 15 12:15:08 2011 -0700
+++ b/test/unit/pcinfoTest.cpp	Mon Aug 15 12:21:54 2011 -0700
@@ -53,7 +53,7 @@
 
 
 #ifdef PDAL_COMPILER_MSVC
-BOOST_AUTO_TEST_CASE(pcinfoTest_1)
+BOOST_AUTO_TEST_CASE(pcinfoTest_no_input)
 {
     const std::string cmd = appName();
 
@@ -68,5 +68,21 @@
 }
 #endif
 
+
+BOOST_AUTO_TEST_CASE(pcinfo_test_common_opts)
+{
+    const std::string cmd = appName();
+
+    std::string output;
+    int stat = Support::run_command(cmd + " -h", output);
+    BOOST_CHECK_EQUAL(stat, 0);
+
+    stat = Support::run_command(cmd + " --version", output);
+    BOOST_CHECK_EQUAL(stat, 0);
+
+    return;
+}
+
+
 BOOST_AUTO_TEST_SUITE_END()
 
diff -r 19e41307eaa8 -r 4c606c33b9c6 test/unit/pcpipelineTest.cpp
--- a/test/unit/pcpipelineTest.cpp	Mon Aug 15 12:15:08 2011 -0700
+++ b/test/unit/pcpipelineTest.cpp	Mon Aug 15 12:21:54 2011 -0700
@@ -53,7 +53,7 @@
 
 
 #ifdef PDAL_COMPILER_MSVC
-BOOST_AUTO_TEST_CASE(pcpipelineTest_1)
+BOOST_AUTO_TEST_CASE(pcpipelineTest_no_input)
 {
     const std::string cmd = appName();
 
@@ -68,4 +68,21 @@
 }
 #endif
 
+
+BOOST_AUTO_TEST_CASE(pcpipelineTest_test_common_opts)
+{
+    const std::string cmd = appName();
+
+    std::string output;
+    int stat = Support::run_command(cmd + " -h", output);
+    BOOST_CHECK_EQUAL(stat, 0);
+
+    stat = Support::run_command(cmd + " --version", output);
+    BOOST_CHECK_EQUAL(stat, 0);
+
+    return;
+}
+
+
 BOOST_AUTO_TEST_SUITE_END()
+


More information about the Liblas-commits mailing list