build+ci: enable AddressSanitizer and LeakSanitizer for unit tests

Refs: #2589, #4206

Change-Id: Ie9770134ff87fce438029b97c9ed61dbef3a71a3
diff --git a/tests/test-sync-logic-handler.cpp b/tests/test-sync-logic-handler.cpp
index 6e47e1c..24bd065 100644
--- a/tests/test-sync-logic-handler.cpp
+++ b/tests/test-sync-logic-handler.cpp
@@ -158,13 +158,12 @@
 
     receiveUpdate(updateName, syncSeqNo, sync_hrdry);
 
-    std::vector<ndn::Interest>& interests = face->sentInterests;
-
-    std::vector<ndn::Interest>::iterator it = interests.begin();
-
     // In HR dry-state all LSA's should be published
-    BOOST_REQUIRE_EQUAL(interests.size(), 1);
-    BOOST_CHECK_EQUAL(it->getName().getPrefix(-1), updateName + "/");
+    const auto& it = std::find_if(face->sentInterests.begin(), face->sentInterests.end(),
+                     [updateName] (const ndn::Interest& interest) {
+                       return interest.getName().getPrefix(-1) == updateName + "/";
+                     });
+    BOOST_REQUIRE(it != face->sentInterests.end());
   }
 }