Browse Source

[2108] Check that iterating past the end throws an exception

Mukund Sivaraman 12 years ago
parent
commit
91ab8fe87a
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/lib/datasrc/memory/tests/memory_client_unittest.cc

+ 3 - 0
src/lib/datasrc/memory/tests/memory_client_unittest.cc

@@ -96,6 +96,9 @@ TEST_F(MemoryClientTest, getIterator) {
 
     // There's nothing else in this zone
     EXPECT_EQ(ConstRRsetPtr(), iterator->getNextRRset());
+
+    // Iterating past the end should result in an exception
+    EXPECT_THROW(iterator->getNextRRset(), isc::Unexpected);
 }
 
 TEST_F(MemoryClientTest, getIteratorGetSOAThrowsNotImplemented) {