This revision was automatically updated to reflect the committed changes.
Closed by commit rGd0e159334f9d: Add matchers for gtests ASSERT_THAT,
EXPECT_THAT, ON_CALL and EXPECT_CALL (authored by zhaomo, committed by ymandel).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
zhaomo added a comment.
Thanks folks!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103195/new/
https://reviews.llvm.org/D103195
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
ymandel accepted this revision.
ymandel added a comment.
Nice!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103195/new/
https://reviews.llvm.org/D103195
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
zhaomo updated this revision to Diff 349030.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103195/new/
https://reviews.llvm.org/D103195
Files:
clang/include/clang/ASTMatchers/GtestMatchers.h
clang/lib/ASTMatchers/GtestMatchers.cpp
clang/unittests/ASTMatchers/GtestMatchersTest.cpp
zhaomo added inline comments.
Comment at: clang/lib/ASTMatchers/GtestMatchers.cpp:41
}
- llvm_unreachable("Unhandled GtestCmp enum");
}
hokein wrote:
> zhaomo wrote:
> > hokein wrote:
> > > why remove this `llvm_unreachable`? I think this is a common
zhaomo updated this revision to Diff 348998.
zhaomo marked an inline comment as done.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103195/new/
https://reviews.llvm.org/D103195
Files:
clang/include/clang/ASTMatchers/GtestMatchers.h
clang/lib/ASTMatchers/GtestMatchers.cpp
hokein added a comment.
a few more nits, the code looks good to me now. As discussed with @ymandel
offline, we should be aware of that before moving forward to this direction --
this patch will likely have the gtest-versioning issue.
Comment at:
zhaomo updated this revision to Diff 348399.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103195/new/
https://reviews.llvm.org/D103195
Files:
clang/include/clang/ASTMatchers/GtestMatchers.h
clang/lib/ASTMatchers/GtestMatchers.cpp
clang/unittests/ASTMatchers/GtestMatchersTest.cpp
zhaomo updated this revision to Diff 348384.
zhaomo marked 4 inline comments as done.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103195/new/
https://reviews.llvm.org/D103195
Files:
clang/include/clang/ASTMatchers/GtestMatchers.h
clang/lib/ASTMatchers/GtestMatchers.cpp
zhaomo added inline comments.
Comment at: clang/include/clang/ASTMatchers/GtestMatchers.h:39
+
/// Matcher for gtest's ASSERT_... macros.
internal::BindableMatcher gtestAssert(GtestCmp Cmp, StatementMatcher
Left,
hokein wrote:
> as we add a new method to
hokein added inline comments.
Comment at: clang/include/clang/ASTMatchers/GtestMatchers.h:34
+enum class MockArgs {
+ NoMatchers,
ymandel wrote:
> hokein wrote:
> > worth comments.
> >
> > out of curiosity, what do we call this `Matchers`? I'd be careful to
ymandel added inline comments.
Comment at: clang/include/clang/ASTMatchers/GtestMatchers.h:55-59
+/// Matcher for gtest's `ON_CALL` macro. When `Args` is `NoMatchers`,
+/// this matches a mock call to a method without argument matchers e.g.
+/// `ON_CALL(mock, TwoParamMethod)`;
hokein added inline comments.
Comment at: clang/include/clang/ASTMatchers/GtestMatchers.h:34
+enum class MockArgs {
+ NoMatchers,
worth comments.
out of curiosity, what do we call this `Matchers`? I'd be careful to introduce
a different matcher concept in
zhaomo updated this revision to Diff 348113.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103195/new/
https://reviews.llvm.org/D103195
Files:
clang/include/clang/ASTMatchers/GtestMatchers.h
clang/lib/ASTMatchers/GtestMatchers.cpp
clang/unittests/ASTMatchers/GtestMatchersTest.cpp
zhaomo updated this revision to Diff 348095.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103195/new/
https://reviews.llvm.org/D103195
Files:
clang/include/clang/ASTMatchers/GtestMatchers.h
clang/lib/ASTMatchers/GtestMatchers.cpp
clang/unittests/ASTMatchers/GtestMatchersTest.cpp
zhaomo updated this revision to Diff 348094.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103195/new/
https://reviews.llvm.org/D103195
Files:
clang/include/clang/ASTMatchers/GtestMatchers.h
clang/lib/ASTMatchers/GtestMatchers.cpp
clang/unittests/ASTMatchers/GtestMatchersTest.cpp
zhaomo updated this revision to Diff 348093.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103195/new/
https://reviews.llvm.org/D103195
Files:
clang/include/clang/ASTMatchers/GtestMatchers.h
clang/lib/ASTMatchers/GtestMatchers.cpp
clang/unittests/ASTMatchers/GtestMatchersTest.cpp
zhaomo created this revision.
zhaomo added a reviewer: ymandel.
Herald added a subscriber: mstorsjo.
zhaomo requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
This patch adds support for matching gtest's ASSERT_THAT, EXPECT_THAT, ON_CALL
and
18 matches
Mail list logo