Fix copyright lines
[folly.git] / folly / futures / test / TimesTest.cpp
index 6f3e9da9cbf1d3461616de41a0f44d4c8cabbe2b..7c327322113eeb4bde8a0e3ec8737b9ed9423d5f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2015 Facebook, Inc.
+ * Copyright 2015-present Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <mutex>
 #include <queue>
 
-#include <gtest/gtest.h>
-#include <glog/logging.h>
-
 #include <folly/futures/Future.h>
 #include <folly/futures/Promise.h>
+#include <folly/portability/GTest.h>
 
 using namespace folly;
 
@@ -42,9 +40,8 @@ inline std::function<Future<Unit>(void)> makeThunk(
     std::mutex& ps_mutex) {
   return [&]() mutable {
     auto p = std::make_shared<Promise<Unit>>();
-    p->setInterruptHandler([&](exception_wrapper const& e) {
-      ++interrupt;
-    });
+    p->setInterruptHandler(
+        [&](exception_wrapper const& /* e */) { ++interrupt; });
     ps_mutex.lock();
     ps.push(p);
     ps_mutex.unlock();
@@ -69,9 +66,9 @@ TEST(Times, success) {
   bool failure = false;
 
   auto thunk = makeThunk(ps, interrupt, ps_mutex);
-  auto f = folly::times(3, thunk)
-    .then([&]() mutable { complete = true; })
-    .onError([&] (FutureException& e) { failure = true; });
+  auto f = folly::times(3, thunk).then([&]() mutable {
+    complete = true;
+  }).onError([&](FutureException& /* e */) { failure = true; });
 
   popAndFulfillPromise(ps, ps_mutex);
   EXPECT_FALSE(complete);
@@ -95,9 +92,9 @@ TEST(Times, failure) {
   bool failure = false;
 
   auto thunk = makeThunk(ps, interrupt, ps_mutex);
-  auto f = folly::times(3, thunk)
-    .then([&]() mutable { complete = true; })
-    .onError([&] (FutureException& e) { failure = true; });
+  auto f = folly::times(3, thunk).then([&]() mutable {
+    complete = true;
+  }).onError([&](FutureException& /* e */) { failure = true; });
 
   popAndFulfillPromise(ps, ps_mutex);
   EXPECT_FALSE(complete);
@@ -123,9 +120,9 @@ TEST(Times, interrupt) {
   bool failure = false;
 
   auto thunk = makeThunk(ps, interrupt, ps_mutex);
-  auto f = folly::times(3, thunk)
-    .then([&]() mutable { complete = true; })
-    .onError([&] (FutureException& e) { failure = true; });
+  auto f = folly::times(3, thunk).then([&]() mutable {
+    complete = true;
+  }).onError([&](FutureException& /* e */) { failure = true; });
 
   EXPECT_EQ(0, interrupt);