OSDN Git Service

[gmock] Teach gmock ElementsAre and BeginEndDistanceIs matchers to
authorChandler Carruth <chandlerc@gmail.com>
Wed, 11 Jan 2017 00:16:03 +0000 (00:16 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Wed, 11 Jan 2017 00:16:03 +0000 (00:16 +0000)
commita618f4d4ce071d8bf458068126f706df1e9e5923
treeb6c07113d4e288e39de2c287f8c83b0baa9000f0
parent53dcfdf89b3170d38878fc03df8713a44c6aa655
[gmock] Teach gmock ElementsAre and BeginEndDistanceIs matchers to
handle generic ranges by using std::begin and std::end rather than
requiring things to look exactly like an STL container.

Much of the credit for this goes to Dave Blaikie who helped me figure
out the right incantations.

This will probably be re-designed when I send this to the maintainers of
gmock, so I've instead structured it to change is little as possible
while it is a local patch. That makes it somewhat ugly, but I think a focused
change is better for getting this to work for LLVM today and letting the
upstream maintainers figure out the correct long-term pattern.

Differential Revision: https://reviews.llvm.org/D28288

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291623 91177308-0d34-0410-b5e6-96231b3b80d8
utils/unittest/googlemock/include/gmock/gmock-matchers.h