mirror of
https://github.com/intrepidcs/libicsneo.git
synced 2026-08-05 09:28:40 +02:00
ThirdParty: Update included gtest
This commit is contained in:
@@ -90,10 +90,10 @@ TEST(IsXDigitTest, ReturnsFalseForWideNonAscii) {
|
||||
|
||||
class Base {
|
||||
public:
|
||||
// Copy constructor and assignment operator do exactly what we need, so we
|
||||
// use them.
|
||||
Base() : member_(0) {}
|
||||
explicit Base(int n) : member_(n) {}
|
||||
Base(const Base&) = default;
|
||||
Base& operator=(const Base&) = default;
|
||||
virtual ~Base() {}
|
||||
int member() { return member_; }
|
||||
|
||||
@@ -201,24 +201,13 @@ TEST(ImplicitCastTest, CanUseImplicitConstructor) {
|
||||
EXPECT_TRUE(converted);
|
||||
}
|
||||
|
||||
TEST(IteratorTraitsTest, WorksForSTLContainerIterators) {
|
||||
StaticAssertTypeEq<int,
|
||||
IteratorTraits< ::std::vector<int>::const_iterator>::value_type>();
|
||||
StaticAssertTypeEq<bool,
|
||||
IteratorTraits< ::std::list<bool>::iterator>::value_type>();
|
||||
}
|
||||
|
||||
TEST(IteratorTraitsTest, WorksForPointerToNonConst) {
|
||||
StaticAssertTypeEq<char, IteratorTraits<char*>::value_type>();
|
||||
StaticAssertTypeEq<const void*, IteratorTraits<const void**>::value_type>();
|
||||
}
|
||||
|
||||
TEST(IteratorTraitsTest, WorksForPointerToConst) {
|
||||
StaticAssertTypeEq<char, IteratorTraits<const char*>::value_type>();
|
||||
StaticAssertTypeEq<const void*,
|
||||
IteratorTraits<const void* const*>::value_type>();
|
||||
}
|
||||
|
||||
// The following code intentionally tests a suboptimal syntax.
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdangling-else"
|
||||
#pragma GCC diagnostic ignored "-Wempty-body"
|
||||
#pragma GCC diagnostic ignored "-Wpragmas"
|
||||
#endif
|
||||
TEST(GtestCheckSyntaxTest, BehavesLikeASingleStatement) {
|
||||
if (AlwaysFalse())
|
||||
GTEST_CHECK_(false) << "This should never be executed; "
|
||||
@@ -234,6 +223,9 @@ TEST(GtestCheckSyntaxTest, BehavesLikeASingleStatement) {
|
||||
else
|
||||
GTEST_CHECK_(true) << "";
|
||||
}
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
TEST(GtestCheckSyntaxTest, WorksWithSwitch) {
|
||||
switch (0) {
|
||||
@@ -381,8 +373,6 @@ TEST(RegexEngineSelectionTest, SelectsCorrectRegexEngine) {
|
||||
|
||||
#if GTEST_USES_POSIX_RE
|
||||
|
||||
# if GTEST_HAS_TYPED_TEST
|
||||
|
||||
template <typename Str>
|
||||
class RETest : public ::testing::Test {};
|
||||
|
||||
@@ -438,8 +428,6 @@ TYPED_TEST(RETest, PartialMatchWorks) {
|
||||
EXPECT_FALSE(RE::PartialMatch(TypeParam("zza"), re));
|
||||
}
|
||||
|
||||
# endif // GTEST_HAS_TYPED_TEST
|
||||
|
||||
#elif GTEST_USES_SIMPLE_RE
|
||||
|
||||
TEST(IsInSetTest, NulCharIsNotInAnySet) {
|
||||
@@ -1198,8 +1186,6 @@ class DestructorTracker {
|
||||
return DestructorCall::List().size() - 1;
|
||||
}
|
||||
const size_t index_;
|
||||
|
||||
GTEST_DISALLOW_ASSIGN_(DestructorTracker);
|
||||
};
|
||||
|
||||
typedef ThreadLocal<DestructorTracker>* ThreadParam;
|
||||
|
||||
Reference in New Issue
Block a user