clang-tools 19.0.0git
Classes | Namespaces | Macros | Functions
clangd/unittests/Matchers.h File Reference
#include "Protocol.h"
#include "gmock/gmock.h"

Go to the source code of this file.

Classes

class  clang::clangd::SubsequenceMatcher< T >
 
class  clang::clangd::PolySubsequenceMatcher< M >
 
class  clang::clangd::OptionalMatcher< InnerMatcher >
 

Namespaces

namespace  clang
 ===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
 
namespace  clang::clangd
 

Macros

#define EXPECT_IFF(condition, value, matcher)
 
#define EXPECT_ERROR(expectedValue)
 

Functions

template<typename... Args>
PolySubsequenceMatcher< Args... > clang::clangd::HasSubsequence (Args &&... M)
 
template<typename InnerMatcher >
OptionalMatcher< InnerMatcher > clang::clangd::HasValue (const InnerMatcher &inner_matcher)
 

Macro Definition Documentation

◆ EXPECT_ERROR

#define EXPECT_ERROR (   expectedValue)
Value:
do { \
auto &&ComputedValue = (expectedValue); \
if (ComputedValue) { \
ADD_FAILURE() << "expected an error from " << #expectedValue \
<< " but got " \
<< ::testing::PrintToString(*ComputedValue); \
break; \
} \
llvm::consumeError(ComputedValue.takeError()); \
} while (false)

Definition at line 118 of file clangd/unittests/Matchers.h.

◆ EXPECT_IFF

#define EXPECT_IFF (   condition,
  value,
  matcher 
)
Value:
do { \
if (condition) \
EXPECT_THAT(value, matcher); \
else \
EXPECT_THAT(value, ::testing::Not(matcher)); \
} while (0)

Definition at line 24 of file clangd/unittests/Matchers.h.