]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2435] Check result of find() in test
authorJINMEI Tatuya <jinmei@isc.org>
Mon, 28 Jan 2013 00:06:45 +0000 (05:36 +0530)
committerMukund Sivaraman <muks@isc.org>
Mon, 28 Jan 2013 00:06:45 +0000 (05:36 +0530)
src/lib/datasrc/tests/database_unittest.cc

index 6b12b3a118e19c96935040612127527ab8f9a1e7..a0fc6bf31350335416a08a6d0eace7a4a6482039 100644 (file)
@@ -4390,11 +4390,13 @@ TYPED_TEST(RRsetCollectionAndUpdaterTest, updateThrows) {
     this->updater_.reset();
     this->updater_ = this->client_->getUpdater(this->zname_, false);
 
-    // Just call getRRsetCollection() here. The .find() is unnecessary,
-    // but we have it to use the result of getRRsetCollection().
-    this->updater_->getRRsetCollection().find(Name("www.example.org"),
-                                              RRClass::IN(),
-                                              RRType::MX());
+    // Just call getRRsetCollection() here. The test using .find() is
+    // unnecessary for the purpose of this test case, but we have it to
+    // use the result of getRRsetCollection() and silence some compiler
+    // complaining about ignoring the return value of
+    // getRRsetCollection().
+    EXPECT_FALSE(this->updater_->getRRsetCollection().
+                 find(Name("www.example.org"), RRClass::IN(), RRType::MX()));
 
     // addRRset() must throw isc::InvalidOperation here.
     EXPECT_THROW(this->updater_->addRRset(*this->rrset_),