blob: 4f8addcf744ae5c4d96f4b98398d8ecd504f1e81 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
//===- GtestMatchers.h - AST Matchers for GTest -----------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file implements matchers specific to structures in the Googletest
// (gtest) framework.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_ASTMATCHERS_GTESTMATCHERS_H
#define LLVM_CLANG_ASTMATCHERS_GTESTMATCHERS_H
#include "clang/AST/Stmt.h"
#include "clang/ASTMatchers/ASTMatchers.h"
namespace clang {
namespace ast_matchers {
/// Gtest's comparison operations.
enum class GtestCmp {
Eq,
Ne,
Ge,
Gt,
Le,
Lt,
};
/// Matcher for gtest's ASSERT_... macros.
internal::BindableMatcher<Stmt> gtestAssert(GtestCmp Cmp, StatementMatcher Left,
StatementMatcher Right);
/// Matcher for gtest's EXPECT_... macros.
internal::BindableMatcher<Stmt> gtestExpect(GtestCmp Cmp, StatementMatcher Left,
StatementMatcher Right);
} // namespace ast_matchers
} // namespace clang
#endif // LLVM_CLANG_ASTMATCHERS_GTESTMATCHERS_H
|