Thrift: standardize coding style
Summary: Standardize indentation, spacing, #defines etc.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664784 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/concurrency/test/TimerManagerTests.h b/lib/cpp/src/concurrency/test/TimerManagerTests.h
index fe56d31..faab733 100644
--- a/lib/cpp/src/concurrency/test/TimerManagerTests.h
+++ b/lib/cpp/src/concurrency/test/TimerManagerTests.h
@@ -10,29 +10,29 @@
using namespace facebook::thrift::concurrency;
-/** ThreadManagerTests class
-
- @author marc
- @version $Id:$ */
-
+/**
+ * ThreadManagerTests class
+ *
+ * @author marc
+ * @version $Id:$
+ */
class TimerManagerTests {
public:
static const double ERROR;
- class Task: public Runnable {
-
- public:
+ class Task: public Runnable {
+ public:
Task(Monitor& monitor, long long timeout) :
_timeout(timeout),
_startTime(Util::currentTime()),
_monitor(monitor),
_success(false),
- _done(false) {}
+ _done(false) {}
- ~Task() {std::cerr << this << std::endl;}
+ ~Task() { std::cerr << this << std::endl; }
void run() {
@@ -58,9 +58,7 @@
{Synchronized s(_monitor);
_monitor.notifyAll();
}
- }
-
-
+ }
long long _timeout;
long long _startTime;
@@ -70,10 +68,12 @@
bool _done;
};
- /** This test creates two tasks and waits for the first to expire within 10% of the expected expiration time. It then verifies that
- the timer manager properly clean up itself and the remaining orphaned timeout task when the manager goes out of scope and its
- destructor is called. */
-
+ /**
+ * This test creates two tasks and waits for the first to expire within 10%
+ * of the expected expiration time. It then verifies that the timer manager
+ * properly clean up itself and the remaining orphaned timeout task when the
+ * manager goes out of scope and its destructor is called.
+ */
bool test00(long long timeout=1000LL) {
shared_ptr<TimerManagerTests::Task> orphanTask = shared_ptr<TimerManagerTests::Task>(new TimerManagerTests::Task(_monitor, 10 * timeout));
@@ -90,7 +90,8 @@
shared_ptr<TimerManagerTests::Task> task = shared_ptr<TimerManagerTests::Task>(new TimerManagerTests::Task(_monitor, timeout));
- {Synchronized s(_monitor);
+ {
+ Synchronized s(_monitor);
timerManager.add(orphanTask, 10 * timeout);