[Liblas-commits] libpc: improved version tests

liblas-commits at liblas.org liblas-commits at liblas.org
Thu Feb 24 13:58:53 EST 2011


details:   http://hg.liblas.orglibpc/rev/fa34b7e642ee
changeset: 93:fa34b7e642ee
user:      Michael P. Gerlek <mpg at flaxen.com>
date:      Thu Feb 24 10:58:48 2011 -0800
description:
improved version tests

diffstat:

 test/unit/ConfigTest.cpp |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r e3294e88851a -r fa34b7e642ee test/unit/ConfigTest.cpp
--- a/test/unit/ConfigTest.cpp	Thu Feb 24 10:55:38 2011 -0800
+++ b/test/unit/ConfigTest.cpp	Thu Feb 24 10:58:48 2011 -0800
@@ -46,16 +46,22 @@
 
 BOOST_AUTO_TEST_CASE(test_version)
 {
-    // just verify it is a string, don't worry about the contents
+    // just verify these functions can be called, don't worry about the values
     
     std::string version = GetVersionString();
+    BOOST_CHECK(!version.empty());
     std::string fullVersion = GetFullVersionString();
+    BOOST_CHECK(!fullVersion.empty());
 
     int major = GetVersionMajor();
+    BOOST_CHECK(major >= 0);
     int minor = GetVersionMinor();
+    BOOST_CHECK(minor >= 0);
     int patch = GetVersionPatch();
+    BOOST_CHECK(patch >= 0);
 
-    int x = GetVersionInteger();
+    int bignum = GetVersionInteger();
+    BOOST_CHECK(bignum > 0);
 
     return;
 }


More information about the Liblas-commits mailing list