Lines Matching refs:Expected

85 static void compareSnippets(StringRef Expected,  in compareSnippets()  argument
87 ASSERT_TRUE(MaybeActual) << "Rewrite failed. Expecting: " << Expected; in compareSnippets()
93 EXPECT_EQ(format(Expected), format(Actual)); in compareSnippets()
130 return [this](Expected<MutableArrayRef<AtomicChange>> C) { in consumer()
144 return [this](Expected<TransformerResult<std::string>> C) { in consumerWithStringMetadata()
159 void testRule(RewriteRule Rule, StringRef Input, StringRef Expected) { in testRule() argument
163 compareSnippets(Expected, rewrite(Input)); in testRule()
167 StringRef Expected) { in testRule() argument
171 compareSnippets(Expected, rewrite(Input)); in testRule()
221 std::string Expected = "int f(string s) { return REPLACED; }"; in TEST_F() local
222 testRule(ruleStrlenSize(), Input, Expected); in TEST_F()
246 std::string Expected = R"cc( in TEST_F() local
252 testRule(std::move(Rule), Input, Expected); in TEST_F()
264 std::string Expected = R"cc(#include "clang/OtherLib.h" in TEST_F() local
270 testRule(Rule, Input, Expected); in TEST_F()
283 std::string Expected = R"cc(#include <clang/OtherLib.h> in TEST_F() local
289 testRule(Rule, Input, Expected); in TEST_F()
301 std::string Expected = R"cc(#include "clang/OtherLib.h" in TEST_F() local
307 testRule(Rule, Input, Expected); in TEST_F()
319 std::string Expected = R"cc(#include <clang/OtherLib.h> in TEST_F() local
325 testRule(Rule, Input, Expected); in TEST_F()
337 std::string Expected = R"cc( in TEST_F() local
342 testRule(Rule, Input, Expected); in TEST_F()
353 std::string Expected = R"cc( in TEST_F() local
364 Input, Expected); in TEST_F()
402 std::string Expected = R"cc( in TEST_F() local
412 testRule(Rule, Input, Expected); in TEST_F()
429 std::string Expected = R"cc( in TEST_F() local
446 Input, Expected); in TEST_F()
462 std::string Expected = R"cc( in TEST_F() local
478 Input, Expected); in TEST_F()
498 std::string Expected = "int f(int x) { CHANGE; }"; in TEST_F() local
501 Input, Expected); in TEST_F()
507 std::string Expected = "int f(int x) { CHANGE; }"; in TEST_F() local
511 Input, Expected); in TEST_F()
517 std::string Expected = "return x;"; in TEST_F() local
521 Input, Expected); in TEST_F()
528 std::string Expected = in TEST_F() local
534 Input, Expected); in TEST_F()
540 std::string Expected = "char f(char *x) { return *x; }"; in TEST_F() local
545 Input, Expected); in TEST_F()
554 std::string Expected = in TEST_F() local
560 Input, Expected); in TEST_F()
566 std::string Expected = in TEST_F() local
575 Input, Expected); in TEST_F()
580 std::string Expected = "int f(char *x) { return *x; }"; in TEST_F() local
589 Input, Expected); in TEST_F()
595 std::string Expected = in TEST_F() local
604 Input, Expected); in TEST_F()
649 std::string Expected = in TEST_F() local
660 Input, Expected); in TEST_F()
666 std::string Expected = in TEST_F() local
677 Input, Expected); in TEST_F()
682 std::string Expected = "int f(char *x) { return *x; }"; in TEST_F() local
696 Input, Expected); in TEST_F()
705 std::string Expected = in TEST_F() local
717 Input, Expected); in TEST_F()
726 std::string Expected = R"cc( in TEST_F() local
737 Input, Expected); in TEST_F()
747 std::string Expected = R"cc( in TEST_F() local
759 Input, Expected); in TEST_F()
769 std::string Expected = R"cc( in TEST_F() local
778 Input, Expected); in TEST_F()
822 std::string Expected = R"( in TEST_F() local
836 Input, Expected); in TEST_F()
848 std::string Expected = R"( in TEST_F() local
863 Input, Expected); in TEST_F()
875 std::string Expected = R"( in TEST_F() local
890 Input, Expected); in TEST_F()
903 std::string Expected = R"( in TEST_F() local
918 Input, Expected); in TEST_F()
936 std::string Expected = R"cc( in TEST_F() local
943 testRule(applyFirst({ruleStrlenSize(), FlagRule}), Input, Expected); in TEST_F()
953 std::string Expected = R"cc( in TEST_F() local
966 testRule(applyFirst({ReplaceF1, ReplaceF1OrF2}), Input, Expected); in TEST_F()
978 std::string Expected = R"cc( in TEST_F() local
991 testRule(applyFirst({ReplaceF1OrF2, ReplaceF1}), Input, Expected); in TEST_F()
1006 std::string Expected = R"cc( in TEST_F() local
1024 testRule(Rule, Input, Expected); in TEST_F()
1036 std::string Expected = R"cc( in TEST_F() local
1049 testRule(applyFirst({ReplaceF1, ReplaceF2}), Input, Expected); in TEST_F()
1436 std::string Expected = R"cc( in TEST_F() local
1444 testRule(R, Input, Expected); in TEST_F()
1454 std::string Expected = R"cc( in TEST_F() local
1459 testRule(ruleStrlenSize(), Input, Expected); in TEST_F()
1468 std::string Expected = R"cc( in TEST_F() local
1473 testRule(ruleStrlenSize(), Input, Expected); in TEST_F()
1484 std::string Expected = R"cc( in TEST_F() local
1490 testRule(ruleStrlenSize(), Input, Expected); in TEST_F()
1503 std::string Expected = R"cc( in TEST_F() local
1508 testRule(ruleStrlenSize(), Input, Expected); in TEST_F()
1518 std::string Expected = R"cc( in TEST_F() local
1523 testRule(makeRule(integerLiteral(), changeTo(cat("LIT"))), Input, Expected); in TEST_F()
1533 std::string Expected = R"cc( in TEST_F() local
1541 Input, Expected); in TEST_F()
1551 std::string Expected = R"cc( in TEST_F() local
1559 Input, Expected); in TEST_F()
1628 llvm::Expected<std::string> UpdatedCode = in TEST_F()
1665 llvm::Expected<std::string> UpdatedCode = in TEST_F()
1691 [&](Expected<MutableArrayRef<AtomicChange>> Changes) { in TEST_F()
1716 std::string Expected = R"cc(REPLACE)cc"; in TEST_F() local
1719 testRule(std::move(Rule), Input, Expected); in TEST_F()