Browse Source

[3287] Update test to use sizeof instead of hardcoded length

Mukund Sivaraman 11 years ago
parent
commit
c1187e4ae7
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/lib/dns/tests/rdata_sshfp_unittest.cc

+ 2 - 1
src/lib/dns/tests/rdata_sshfp_unittest.cc

@@ -227,7 +227,8 @@ TEST_F(Rdata_SSHFP_Test, toWire) {
     this->obuffer.clear();
     rdata_sshfp.toWire(this->obuffer);
 
-    EXPECT_EQ(22, this->obuffer.getLength());
+    EXPECT_EQ(sizeof (rdata_sshfp_wiredata),
+              this->obuffer.getLength());
 
     EXPECT_PRED_FORMAT4(UnitTestUtil::matchWireData,
                         this->obuffer.getData(),