/*
- * Copyright 2017 Facebook, Inc.
+ * Copyright 2011-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.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
// @author: Andrei Alexandrescu (aalexandre)
// Test bed for folly/Synchronized.h
+#include <folly/Synchronized.h>
#include <folly/LockTraitsBoost.h>
#include <folly/Portability.h>
-#include <folly/RWSpinLock.h>
#include <folly/SharedMutex.h>
#include <folly/SpinLock.h>
-#include <folly/Synchronized.h>
#include <folly/portability/GTest.h>
+#include <folly/synchronization/RWSpinLock.h>
#include <folly/test/SynchronizedTestLib.h>
using namespace folly::sync_tests;
testConstCopy<TypeParam>();
}
+TYPED_TEST(SynchronizedTest, InPlaceConstruction) {
+ testInPlaceConstruction<TypeParam>();
+}
+
+TYPED_TEST(SynchronizedTest, Exchange) {
+ testExchange<TypeParam>();
+}
+
template <class Mutex>
class SynchronizedTimedTest : public testing::Test {};
testTimedSynchronizedWithConst<TypeParam>();
}
-TYPED_TEST(SynchronizedTest, InPlaceConstruction) {
- testInPlaceConstruction<TypeParam>();
-}
-
using CountPair = std::pair<int, int>;
// This class is specialized only to be uesed in SynchronizedLockTest
class FakeMutex {