From e79bf1a1f98b32f0f8b0ea43eaebe4182e83c44e Mon Sep 17 00:00:00 2001 From: Konstantin Tsoy Date: Fri, 5 Nov 2021 20:17:46 -0700 Subject: [PATCH] Fix byte event tests on Mac Summary: Comparator in test byte event callback class wasn't accounting for the type field. Reviewed By: mjoras, lnicco Differential Revision: D32226068 fbshipit-source-id: 62c67b08f91ff3eee4096fa9dc777fc7000a5854 --- quic/api/test/QuicTransportBaseTest.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/quic/api/test/QuicTransportBaseTest.cpp b/quic/api/test/QuicTransportBaseTest.cpp index 328f1b31c..852094512 100644 --- a/quic/api/test/QuicTransportBaseTest.cpp +++ b/quic/api/test/QuicTransportBaseTest.cpp @@ -167,7 +167,9 @@ class TestByteEventCallback : public QuicSocket::ByteEventCallback { return folly::hash::hash_combine(e.id, e.offset, e.type); }; ComparatorFn comparator = [](const ByteEvent& lhs, const ByteEvent& rhs) { - return ((lhs.id == rhs.id) && (lhs.offset == rhs.offset)); + return ( + (lhs.id == rhs.id) && (lhs.offset == rhs.offset) && + (lhs.type == rhs.type)); }; std::unordered_map byteEventTracker_{ /* bucket count */ 4,