Googletest export

Remove scoped_ptr replace with std::unique_ptr

PiperOrigin-RevId: 219291284
This commit is contained in:
misterg
2018-10-30 09:49:22 -04:00
committed by Gennadiy Civil
parent e0d3c37051
commit e857f9cdd9
13 changed files with 30 additions and 80 deletions

View File

@@ -37,6 +37,7 @@
#endif // GTEST_OS_MAC
#include <list>
#include <memory>
#include <utility> // For std::pair and std::make_pair.
#include <vector>
@@ -218,14 +219,6 @@ TEST(IteratorTraitsTest, WorksForPointerToConst) {
IteratorTraits<const void* const*>::value_type>();
}
// Tests that the element_type typedef is available in scoped_ptr and refers
// to the parameter type.
TEST(ScopedPtrTest, DefinesElementType) {
StaticAssertTypeEq<int, ::testing::internal::scoped_ptr<int>::element_type>();
}
// FIXME: Implement THE REST of scoped_ptr tests.
TEST(GtestCheckSyntaxTest, BehavesLikeASingleStatement) {
if (AlwaysFalse())
GTEST_CHECK_(false) << "This should never be executed; "
@@ -1095,7 +1088,7 @@ TEST(MutexTest, OnlyOneThreadCanLockAtATime) {
typedef ThreadWithParam<pair<AtomicCounterWithMutex*, int> > ThreadType;
const int kCycleCount = 20;
const int kThreadCount = 7;
scoped_ptr<ThreadType> counting_threads[kThreadCount];
std::unique_ptr<ThreadType> counting_threads[kThreadCount];
Notification threads_can_start;
// Creates and runs kThreadCount threads that increment locked_counter
// kCycleCount times each.