Skip to content

Commit 2fe51a3

Browse files
committed
amend! amend! Bump googletest to v1.14.0
Bump googletest to v1.14.0 This patch bumps GoogleTest to version 1.14.0
1 parent 745a762 commit 2fe51a3

File tree

3 files changed

+49
-14
lines changed

3 files changed

+49
-14
lines changed

third-party/unittest/googlemock/include/gmock/gmock-matchers.h

+37-14
Original file line numberDiff line numberDiff line change
@@ -2356,6 +2356,15 @@ class BeginEndDistanceIsMatcher {
23562356
template <typename Container>
23572357
class Impl : public MatcherInterface<Container> {
23582358
public:
2359+
// LLVM local change to support std::begin/std::end.
2360+
//
2361+
// typedef internal::StlContainerView<GTEST_REMOVE_REFERENCE_AND_CONST_(
2362+
// Container)>
2363+
// ContainerView;
2364+
// typedef typename std::iterator_traits<
2365+
// typename ContainerView::type::const_iterator>::difference_type
2366+
// DistanceType;
2367+
//
23592368
typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;
23602369
typedef internal::StlContainerView<RawContainer> View;
23612370
typedef typename View::type StlContainer;
@@ -2364,12 +2373,7 @@ class BeginEndDistanceIsMatcher {
23642373
std::declval<StlContainerReference>())) StlContainerConstIterator;
23652374
typedef typename std::iterator_traits<
23662375
StlContainerConstIterator>::difference_type DistanceType;
2367-
// typedef internal::StlContainerView<GTEST_REMOVE_REFERENCE_AND_CONST_(
2368-
// Container)>
2369-
// ContainerView;
2370-
// typedef typename std::iterator_traits<
2371-
// typename ContainerView::type::const_iterator>::difference_type
2372-
// DistanceType;
2376+
// LLVM local change end.
23732377
explicit Impl(const DistanceMatcher& distance_matcher)
23742378
: distance_matcher_(MatcherCast<DistanceType>(distance_matcher)) {}
23752379

@@ -3378,11 +3382,16 @@ class ElementsAreMatcherImpl : public MatcherInterface<Container> {
33783382
typedef internal::StlContainerView<RawContainer> View;
33793383
typedef typename View::type StlContainer;
33803384
typedef typename View::const_reference StlContainerReference;
3385+
3386+
// LLVM local change to support std::begin/std::end.
3387+
//
3388+
// typedef typename StlContainer::value_type Element;
3389+
//
33813390
typedef decltype(std::begin(
33823391
std::declval<StlContainerReference>())) StlContainerConstIterator;
33833392
typedef typename std::remove_reference<
33843393
decltype(*std::declval<StlContainerConstIterator &>())>::type Element;
3385-
//typedef typename StlContainer::value_type Element;
3394+
// LLVM local change end.
33863395

33873396
// Constructs the matcher from a sequence of element values or
33883397
// element matchers.
@@ -3439,7 +3448,12 @@ class ElementsAreMatcherImpl : public MatcherInterface<Container> {
34393448
// explanations[i] is the explanation of the element at index i.
34403449
::std::vector<std::string> explanations(count());
34413450
StlContainerReference stl_container = View::ConstReference(container);
3451+
// LLVM local change to support std::begin/std::end.
3452+
//
3453+
// auto it = stl_container.begin();
3454+
//
34423455
StlContainerConstIterator it = stl_container.begin();
3456+
// LLVM local change end.
34433457
size_t exam_pos = 0;
34443458
bool mismatch_found = false; // Have we found a mismatched element yet?
34453459

@@ -3628,12 +3642,14 @@ class UnorderedElementsAreMatcherImpl
36283642
typedef internal::StlContainerView<RawContainer> View;
36293643
typedef typename View::type StlContainer;
36303644
typedef typename View::const_reference StlContainerReference;
3645+
// LLVM local change to support std::begin/std::end.
3646+
//
3647+
// typedef typename StlContainer::value_type Element;
36313648
typedef decltype(std::begin(
36323649
std::declval<StlContainerReference>())) StlContainerConstIterator;
36333650
typedef typename std::remove_reference<
36343651
decltype(*std::declval<StlContainerConstIterator &>())>::type Element;
3635-
//typedef typename StlContainer::value_type Element;
3636-
3652+
// LLVM local change end.
36373653
template <typename InputIter>
36383654
UnorderedElementsAreMatcherImpl(UnorderedMatcherRequire::Flags matcher_flags,
36393655
InputIter first, InputIter last)
@@ -3720,15 +3736,18 @@ class UnorderedElementsAreMatcher {
37203736
template <typename Container>
37213737
operator Matcher<Container>() const {
37223738
typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;
3723-
3739+
// LLVM local change to support std::begin/std::end.
3740+
//
3741+
// typedef typename internal::StlContainerView<RawContainer>::type View;
3742+
// typedef typename View::value_type Element;
3743+
//
37243744
typedef internal::StlContainerView<RawContainer> View;
37253745
typedef typename View::const_reference StlContainerReference;
37263746
typedef decltype(std::begin(
37273747
std::declval<StlContainerReference>())) StlContainerConstIterator;
37283748
typedef typename std::remove_reference<
37293749
decltype(*std::declval<StlContainerConstIterator &>())>::type Element;
3730-
// typedef typename internal::StlContainerView<RawContainer>::type View;
3731-
// typedef typename View::value_type Element;
3750+
// LLVM local change end.
37323751
typedef ::std::vector<Matcher<const Element&>> MatcherVec;
37333752
MatcherVec matchers;
37343753
matchers.reserve(::std::tuple_size<MatcherTuple>::value);
@@ -3758,14 +3777,18 @@ class ElementsAreMatcher {
37583777
"use UnorderedElementsAre with hash tables");
37593778

37603779
typedef GTEST_REMOVE_REFERENCE_AND_CONST_(Container) RawContainer;
3780+
// LLVM local change to support std::begin/std::end.
3781+
//
3782+
// typedef typename internal::StlContainerView<RawContainer>::type View;
3783+
// typedef typename View::value_type Element;
3784+
//
37613785
typedef internal::StlContainerView<RawContainer> View;
37623786
typedef typename View::const_reference StlContainerReference;
37633787
typedef decltype(std::begin(
37643788
std::declval<StlContainerReference>())) StlContainerConstIterator;
37653789
typedef typename std::remove_reference<
37663790
decltype(*std::declval<StlContainerConstIterator &>())>::type Element;
3767-
// typedef typename internal::StlContainerView<RawContainer>::type View;
3768-
// typedef typename View::value_type Element;
3791+
// LLVM local change end.
37693792
typedef ::std::vector<Matcher<const Element&>> MatcherVec;
37703793
MatcherVec matchers;
37713794
matchers.reserve(::std::tuple_size<MatcherTuple>::value);

third-party/unittest/googletest/include/gtest/gtest-message.h

+8
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,11 @@ class GTEST_API_ Message {
145145
// overloads of << defined in the global namespace and those
146146
// visible via Koenig lookup are both exposed in this function.
147147
using ::operator<<;
148+
// LLVM local change to support llvm printables.
149+
//
150+
// *ss_ << val;
148151
*ss_ << llvm_gtest::printable(val);
152+
// LLVM local change end.
149153
return *this;
150154
}
151155

@@ -183,7 +187,11 @@ class GTEST_API_ Message {
183187
if (pointer == nullptr) {
184188
*ss_ << "(null)";
185189
} else {
190+
// LLVM local change to support llvm printables.
191+
//
192+
// *ss_ << pointer;
186193
*ss_ << llvm_gtest::printable(pointer);
194+
// LLVM local change end.
187195
}
188196
return *this;
189197
}

third-party/unittest/googletest/include/gtest/gtest-printers.h

+4
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,11 @@ struct StreamPrinter {
222222
-> decltype((void)(*os << value)) {
223223
// Call streaming operator found by ADL, possibly with implicit conversions
224224
// of the arguments.
225+
// LLVM local change to support llvm printables.
226+
//
227+
// *os << value;
225228
*os << ::llvm_gtest::printable(value);
229+
// LLVM local change end.
226230
}
227231
};
228232

0 commit comments

Comments
 (0)