10#include "gmock/gmock-matchers.h"
11#include "gmock/gmock.h"
12#include "gtest/gtest.h"
20TEST_F(SwapBinaryOperandsTest, Test) {
22 EXPECT_EQ(apply(
"int *p = nullptr; bool c = ^p == nullptr;"),
23 "int *p = nullptr; bool c = nullptr == p;");
24 EXPECT_EQ(apply(
"int *p = nullptr; bool c = p ^== nullptr;"),
25 "int *p = nullptr; bool c = nullptr == p;");
26 EXPECT_EQ(apply(
"int x = 3; bool c = ^x >= 5;"),
27 "int x = 3; bool c = 5 <= x;");
28 EXPECT_EQ(apply(
"int x = 3; bool c = x >^= 5;"),
29 "int x = 3; bool c = 5 <= x;");
30 EXPECT_EQ(apply(
"int x = 3; bool c = x >=^ 5;"),
31 "int x = 3; bool c = 5 <= x;");
32 EXPECT_EQ(apply(
"int x = 3; bool c = x >=^ 5;"),
33 "int x = 3; bool c = 5 <= x;");
34 EXPECT_EQ(apply(
"int f(); int x = 3; bool c = x >=^ f();"),
35 "int f(); int x = 3; bool c = f() <= x;");
36 EXPECT_EQ(apply(R
"cpp(
39 int x = 3; bool c = x >=^ F();
44 int x = 3; bool c = F() <= x;
46 EXPECT_EQ(apply(R"cpp(
49 int x = 3; bool c = x >=^ F;
54 int x = 3; bool c = F <= x;
56 EXPECT_EQ(apply(R"cpp(
68 ExtraArgs = {"-std=c++20"};
69 Context = CodeContext::File;
72 struct strong_ordering {
74 static const strong_ordering less;
75 static const strong_ordering equivalent;
76 static const strong_ordering equal;
77 static const strong_ordering greater;
79 inline constexpr strong_ordering strong_ordering::less {-1};
80 inline constexpr strong_ordering strong_ordering::equivalent {0};
81 inline constexpr strong_ordering strong_ordering::equal {0};
82 inline constexpr strong_ordering strong_ordering::greater {1};
#define TWEAK_TEST(TweakID)
#define EXPECT_UNAVAILABLE(MarkedCode)
TEST_F(BackgroundIndexTest, NoCrashOnErrorFile)
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//