[Liblas-commits] hg: Updated Header tests to catch up with the recent change to n...

liblas-commits at liblas.org liblas-commits at liblas.org
Thu Jul 29 11:58:00 EDT 2010


changeset 783324a4e8f5 in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=783324a4e8f5
summary: Updated Header tests to catch up with the recent change to number of entries in point records by return array.

diffstat:

 test/unit/lasheader_test.cpp |  23 +++++++++++++++--------
 1 files changed, 15 insertions(+), 8 deletions(-)

diffs (51 lines):

diff -r a227d7b038ef -r 783324a4e8f5 test/unit/lasheader_test.cpp
--- a/test/unit/lasheader_test.cpp	Thu Jul 29 16:50:55 2010 +0100
+++ b/test/unit/lasheader_test.cpp	Thu Jul 29 17:01:38 2010 +0100
@@ -251,32 +251,39 @@
         typedef ::liblas::uint32_t count_type;
 
         liblas::Header h;
-        ensure_equals(h.GetPointRecordsByReturnCount().size(), size_type(5));
+        // NOTE: The committee in its infinite stupidity decided to increase the size of this array to 7 at 1.3.
+        ensure(h.GetPointRecordsByReturnCount().size() >= 5);
+        ensure(h.GetPointRecordsByReturnCount().size() <= 7);
 
         h.SetPointRecordsByReturnCount(0, 100);
-        ensure_equals(h.GetPointRecordsByReturnCount().size(), size_type(5));
+        ensure(h.GetPointRecordsByReturnCount().size() >= 5);
+        ensure(h.GetPointRecordsByReturnCount().size() <= 7);
         ensure_equals(h.GetPointRecordsByReturnCount().at(0), count_type(100));
 
         h.SetPointRecordsByReturnCount(1, 101);
-        ensure_equals(h.GetPointRecordsByReturnCount().size(), size_type(5));
+        ensure(h.GetPointRecordsByReturnCount().size() >= 5);
+        ensure(h.GetPointRecordsByReturnCount().size() <= 7);
         ensure_equals(h.GetPointRecordsByReturnCount().at(1), count_type(101));
 
         h.SetPointRecordsByReturnCount(2, 102);
-        ensure_equals(h.GetPointRecordsByReturnCount().size(), size_type(5));
+        ensure(h.GetPointRecordsByReturnCount().size() >= 5);
+        ensure(h.GetPointRecordsByReturnCount().size() <= 7);
         ensure_equals(h.GetPointRecordsByReturnCount().at(2), count_type(102));
 
         h.SetPointRecordsByReturnCount(3, 103);
-        ensure_equals(h.GetPointRecordsByReturnCount().size(), size_type(5));
+        ensure(h.GetPointRecordsByReturnCount().size() >= 5);
+        ensure(h.GetPointRecordsByReturnCount().size() <= 7);
         ensure_equals(h.GetPointRecordsByReturnCount().at(3), count_type(103));
 
         h.SetPointRecordsByReturnCount(4, 104);
-        ensure_equals(h.GetPointRecordsByReturnCount().size(), size_type(5));
+        ensure(h.GetPointRecordsByReturnCount().size() >= 5);
+        ensure(h.GetPointRecordsByReturnCount().size() <= 7);
         ensure_equals(h.GetPointRecordsByReturnCount().at(4), count_type(104));
 
         try
         {
-            // 5 is out of range
-            h.SetPointRecordsByReturnCount(5, 500);
+            // 8 is out of range
+            h.SetPointRecordsByReturnCount(8, 500);
             ensure("std::out_of_range not thrown", false);
         }
         catch (std::out_of_range const& e)


More information about the Liblas-commits mailing list