tests: move integrated tests into unit tests
Change-Id: Ifed29e53091ca430582b1c2e7f3514e02d7c8d14
diff --git a/src/logic.cpp b/src/logic.cpp
index 0c5b87a..e0c0501 100644
--- a/src/logic.cpp
+++ b/src/logic.cpp
@@ -121,14 +121,15 @@
}
void
-Logic::reset()
+Logic::reset(bool isOnInterest)
{
m_isInReset = true;
m_state.reset();
m_log.clear();
- sendResetInterest();
+ if (!isOnInterest)
+ sendResetInterest();
// reset outstanding interest name, so that data for previous interest will be dropped.
if (m_outstandingInterestId != 0) {
@@ -173,7 +174,7 @@
sessionName.appendNumber(ndn::time::toUnixTimestamp(ndn::time::system_clock::now()).count());
m_nodeList[userPrefix].sessionName = sessionName;
m_nodeList[userPrefix].seqNo = 0;
- reset();
+ reset(false);
}
}
@@ -193,7 +194,7 @@
m_defaultSigningId = DEFAULT_NAME;
}
}
- reset();
+ reset(false);
}
}
@@ -459,7 +460,7 @@
Logic::processResetInterest(const Interest& interest)
{
_LOG_DEBUG_ID(">> Logic::processResetInterest");
- reset();
+ reset(true);
}
void