BIND 10 trac1568_new, updated. 758d1d155f95a65702969866454ccfdfd90a7336 [1568] Fix a test that failed

BIND 10 source code commits bind10-changes at lists.isc.org
Wed Mar 14 11:47:52 UTC 2012


The branch, trac1568_new has been updated
       via  758d1d155f95a65702969866454ccfdfd90a7336 (commit)
      from  3422adaa26b0e1c24d6e230694975a4986cb0965 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 758d1d155f95a65702969866454ccfdfd90a7336
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date:   Wed Mar 14 12:46:51 2012 +0100

    [1568] Fix a test that failed
    
    We can no longer EXPECT_THROW, if we don't throw.

-----------------------------------------------------------------------

Summary of changes:
 src/lib/util/tests/buffer_unittest.cc |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/util/tests/buffer_unittest.cc b/src/lib/util/tests/buffer_unittest.cc
index 666924e..8cccd28 100644
--- a/src/lib/util/tests/buffer_unittest.cc
+++ b/src/lib/util/tests/buffer_unittest.cc
@@ -182,7 +182,17 @@ TEST_F(BufferTest, outputBufferReadat) {
     for (int i = 0; i < sizeof(testdata); i ++) {
         EXPECT_EQ(testdata[i], obuffer[i]);
     }
-    EXPECT_THROW(obuffer[sizeof(testdata)], isc::util::InvalidBufferPosition);
+#ifdef EXPECT_DEATH
+    // We use assert now, so we check it dies
+    EXPECT_DEATH({
+        try {
+            obuffer[sizeof(testdata)];
+        } catch (...) {
+            // Prevent exceptions killing the application, we need
+            // to make sure it dies the real hard way
+        }
+        }, "");
+#endif
 }
 
 TEST_F(BufferTest, outputBufferClear) {



More information about the bind10-changes mailing list