Parcourir la source

[3200] In one more AssertionFailure pass the error message as parameter.

Marcin Siodelski il y a 11 ans
Parent
commit
45eb1980e4
1 fichiers modifiés avec 4 ajouts et 3 suppressions
  1. 4 3
      src/bin/dhcp4/tests/dhcp4_test_utils.cc

+ 4 - 3
src/bin/dhcp4/tests/dhcp4_test_utils.cc

@@ -371,9 +371,10 @@ Dhcpv4SrvTest::createPacketFromBuffer(const Pkt4Ptr& src_pkt,
         // Parse the new packet and return to the caller.
         dst_pkt->unpack();
     } catch (const Exception& ex) {
-        return (::testing::AssertionFailure()
-                << "Failed to parse a destination packet: "
-                << ex.what());
+        return (::testing::AssertionFailure(::testing::Message()
+                                            << "Failed to parse a"
+                                            << " destination packet: "
+                                            << ex.what()));
     }
 
     return (::testing::AssertionSuccess());