core: rename nfd::EventId to nfd::scheduler::EventId
refs #2298
Change-Id: I5d4f4c5234fd370666e81a8a8e7d312694a6ad5d
diff --git a/tests/core/scheduler.cpp b/tests/core/scheduler.cpp
index 954c31e..dcafac2 100644
--- a/tests/core/scheduler.cpp
+++ b/tests/core/scheduler.cpp
@@ -1,11 +1,12 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014 Regents of the University of California,
- * Arizona Board of Regents,
- * Colorado State University,
- * University Pierre & Marie Curie, Sorbonne University,
- * Washington University in St. Louis,
- * Beijing Institute of Technology
+ * Copyright (c) 2014-2015, Regents of the University of California,
+ * Arizona Board of Regents,
+ * Colorado State University,
+ * University Pierre & Marie Curie, Sorbonne University,
+ * Washington University in St. Louis,
+ * Beijing Institute of Technology,
+ * The University of Memphis.
*
* This file is part of NFD (Named Data Networking Forwarding Daemon).
* See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
*
* You should have received a copy of the GNU General Public License along with
* NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
#include "core/scheduler.hpp"
@@ -29,6 +30,9 @@
namespace nfd {
namespace tests {
+using scheduler::EventId;
+using scheduler::ScopedEventId;
+
BOOST_FIXTURE_TEST_SUITE(CoreScheduler, BaseFixture)
class SchedulerFixture : protected BaseFixture
@@ -115,7 +119,7 @@
{
int hit = 0;
{
- scheduler::ScopedEventId se = scheduler::schedule(time::milliseconds(10), [&] { ++hit; });
+ ScopedEventId se = scheduler::schedule(time::milliseconds(10), [&] { ++hit; });
} // se goes out of scope
this->advanceClocks(time::milliseconds(1), 15);
BOOST_CHECK_EQUAL(hit, 0);
@@ -124,7 +128,7 @@
BOOST_FIXTURE_TEST_CASE(ScopedEventIdAssign, UnitTestTimeFixture)
{
int hit1 = 0, hit2 = 0;
- scheduler::ScopedEventId se1 = scheduler::schedule(time::milliseconds(10), [&] { ++hit1; });
+ ScopedEventId se1 = scheduler::schedule(time::milliseconds(10), [&] { ++hit1; });
se1 = scheduler::schedule(time::milliseconds(10), [&] { ++hit2; });
this->advanceClocks(time::milliseconds(1), 15);
BOOST_CHECK_EQUAL(hit1, 0);
@@ -135,7 +139,7 @@
{
int hit = 0;
{
- scheduler::ScopedEventId se = scheduler::schedule(time::milliseconds(10), [&] { ++hit; });
+ ScopedEventId se = scheduler::schedule(time::milliseconds(10), [&] { ++hit; });
se.release();
} // se goes out of scope
this->advanceClocks(time::milliseconds(1), 15);
@@ -147,8 +151,8 @@
int hit = 0;
unique_ptr<scheduler::ScopedEventId> se2;
{
- scheduler::ScopedEventId se = scheduler::schedule(time::milliseconds(10), [&] { ++hit; });
- se2.reset(new scheduler::ScopedEventId(std::move(se)));
+ ScopedEventId se = scheduler::schedule(time::milliseconds(10), [&] { ++hit; });
+ se2.reset(new ScopedEventId(std::move(se)));
} // se goes out of scope
this->advanceClocks(time::milliseconds(1), 15);
BOOST_CHECK_EQUAL(hit, 1);
diff --git a/tests/limited-io.hpp b/tests/limited-io.hpp
index ee358b0..3e4be61 100644
--- a/tests/limited-io.hpp
+++ b/tests/limited-io.hpp
@@ -1,12 +1,12 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014, Regents of the University of California,
- * Arizona Board of Regents,
- * Colorado State University,
- * University Pierre & Marie Curie, Sorbonne University,
- * Washington University in St. Louis,
- * Beijing Institute of Technology,
- * The University of Memphis
+ * Copyright (c) 2014-2015, Regents of the University of California,
+ * Arizona Board of Regents,
+ * Colorado State University,
+ * University Pierre & Marie Curie, Sorbonne University,
+ * Washington University in St. Louis,
+ * Beijing Institute of Technology,
+ * The University of Memphis.
*
* This file is part of NFD (Named Data Networking Forwarding Daemon).
* See AUTHORS.md for complete list of NFD authors and contributors.
@@ -102,7 +102,7 @@
UnitTestTimeFixture* m_uttf;
bool m_isRunning;
int m_nOpsRemaining;
- EventId m_timeout;
+ scheduler::EventId m_timeout;
StopReason m_reason;
std::exception m_lastException;
};
diff --git a/tests/rib/remote-registrator.cpp b/tests/rib/remote-registrator.cpp
index c0ef540..ed3181a 100644
--- a/tests/rib/remote-registrator.cpp
+++ b/tests/rib/remote-registrator.cpp
@@ -1,12 +1,12 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014, Regents of the University of California,
- * Arizona Board of Regents,
- * Colorado State University,
- * University Pierre & Marie Curie, Sorbonne University,
- * Washington University in St. Louis,
- * Beijing Institute of Technology,
- * The University of Memphis
+ * Copyright (c) 2014-2015, Regents of the University of California,
+ * Arizona Board of Regents,
+ * Colorado State University,
+ * University Pierre & Marie Curie, Sorbonne University,
+ * Washington University in St. Louis,
+ * Beijing Institute of Technology,
+ * The University of Memphis.
*
* This file is part of NFD (Named Data Networking Forwarding Daemon).
* See AUTHORS.md for complete list of NFD authors and contributors.
@@ -348,7 +348,7 @@
Name indentity("/remote/register");
remoteRegistrator->m_regEntries.insert(
- nfd::rib::RemoteRegistrator::RegisteredEntry(indentity, EventId()));
+ nfd::rib::RemoteRegistrator::RegisteredEntry(indentity, scheduler::EventId()));
eraseEntryWithIdentity(indentity);
@@ -386,7 +386,7 @@
insertEntryWithIdentity(identity);
- EventId event;
+ scheduler::EventId event;
remoteRegistrator->m_regEntries.insert(
nfd::rib::RemoteRegistrator::RegisteredEntry(identity, event));
@@ -412,8 +412,8 @@
Name identityShort("/remote/register");
Name identityLong("/remote/register/long");
- EventId eventShort;
- EventId eventLong;
+ scheduler::EventId eventShort;
+ scheduler::EventId eventLong;
insertEntryWithIdentity(identityShort, name::Component("appA"));
@@ -461,7 +461,7 @@
insertEntryWithIdentity(identity, DEFAULT_APP_NAME, faceId);
- EventId event;
+ scheduler::EventId event;
remoteRegistrator->m_regEntries.insert(
nfd::rib::RemoteRegistrator::RegisteredEntry(identity, event));
@@ -488,7 +488,7 @@
insertEntryWithIdentity(identity);
- EventId event;
+ scheduler::EventId event;
remoteRegistrator->m_regEntries.insert(
nfd::rib::RemoteRegistrator::RegisteredEntry(identity, event));