clang-tools 22.0.0git
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 >

Namespaces

namespace  clang
 ===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
namespace  clang::clangd
 FIXME: Skip testing on windows temporarily due to the different escaping code mode.

Macros

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

Functions

template<typename... Args>
PolySubsequenceMatcher< Args... > clang::clangd::HasSubsequence (Args &&... M)

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.