/*
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2014-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 <folly/detail/MemoryIdler.h>
-#include <folly/Baton.h>
-#include <folly/portability/Windows.h>
+#include <folly/portability/GMock.h>
+#include <folly/portability/GTest.h>
+#include <folly/synchronization/Baton.h>
#include <memory>
#include <thread>
-#include <assert.h>
-#include <semaphore.h>
-
-#include <gmock/gmock.h>
-#include <gtest/gtest.h>
using namespace folly;
using namespace folly::detail;
/// method signatures differ from the real Futex because we have elided
/// unused default params and collapsed templated methods into the
/// used type
-template<>
+template <>
struct Futex<MockAtom> {
MOCK_METHOD2(futexWait, bool(uint32_t, uint32_t));
MOCK_METHOD3(futexWaitUntil,
FutexResult(uint32_t, const MockClock::time_point&, uint32_t));
};
-}}
+} // namespace detail
+} // namespace folly
TEST(MemoryIdler, futexWaitValueChangedEarly) {
StrictMock<Futex<MockAtom>> fut;