Lines Matching defs:Cat
68 auto Cat = [&T](StringRef S) { return (T + S).str(); };
70 EXPECT_EQ(Cat("const MyInt target = 0;"),
71 runCheckOnCode<ValueLTransform>(Cat(S)));
72 EXPECT_EQ(Cat("const MyInt target = 0;"),
73 runCheckOnCode<PointeeLTransform>(Cat(S)));
75 EXPECT_EQ(Cat("MyInt const target = 0;"),
76 runCheckOnCode<ValueRTransform>(Cat(S)));
77 EXPECT_EQ(Cat("MyInt const target = 0;"),
78 runCheckOnCode<PointeeRTransform>(Cat(S)));
83 auto Cat = [&T](StringRef S) { return (T + S).str(); };
85 EXPECT_EQ(Cat("const MyInt target = nullptr;"),
86 runCheckOnCode<ValueLTransform>(Cat(S)));
87 EXPECT_EQ(Cat("const MyInt target = nullptr;"),
88 runCheckOnCode<PointeeLTransform>(Cat(S)));
90 EXPECT_EQ(Cat("MyInt const target = nullptr;"),
91 runCheckOnCode<ValueRTransform>(Cat(S)));
92 EXPECT_EQ(Cat("MyInt const target = nullptr;"),
93 runCheckOnCode<PointeeRTransform>(Cat(S)));
98 auto Cat = [&T](StringRef S) { return (T + S).str(); };
100 EXPECT_EQ(Cat("const MyInt target = 0;"),
101 runCheckOnCode<ValueLTransform>(Cat(S)));
102 EXPECT_EQ(Cat("const MyInt target = 0;"),
103 runCheckOnCode<PointeeLTransform>(Cat(S)));
105 EXPECT_EQ(Cat("MyInt const target = 0;"),
106 runCheckOnCode<ValueRTransform>(Cat(S)));
107 EXPECT_EQ(Cat("MyInt const target = 0;"),
108 runCheckOnCode<PointeeRTransform>(Cat(S)));
113 auto Cat = [&T](StringRef S) { return (T + S).str(); };
115 EXPECT_EQ(Cat("const MyInt target = nullptr;"),
116 runCheckOnCode<ValueLTransform>(Cat(S)));
117 EXPECT_EQ(Cat("const MyInt target = nullptr;"),
118 runCheckOnCode<PointeeLTransform>(Cat(S)));
120 EXPECT_EQ(Cat("MyInt const target = nullptr;"),
121 runCheckOnCode<ValueRTransform>(Cat(S)));
122 EXPECT_EQ(Cat("MyInt const target = nullptr;"),
123 runCheckOnCode<PointeeRTransform>(Cat(S)));
128 auto Cat = [&T](StringRef S) { return (T + S).str(); };
130 EXPECT_EQ(Cat("const auto target = f();"),
131 runCheckOnCode<ValueLTransform>(Cat(S)));
132 EXPECT_EQ(Cat("const auto target = f();"),
133 runCheckOnCode<PointeeLTransform>(Cat(S)));
135 EXPECT_EQ(Cat("auto const target = f();"),
136 runCheckOnCode<ValueRTransform>(Cat(S)));
137 EXPECT_EQ(Cat("auto const target = f();"),
138 runCheckOnCode<PointeeRTransform>(Cat(S)));
143 auto Cat = [&T](StringRef S) { return (T + S).str(); };
145 EXPECT_EQ(Cat("const auto target = f();"),
146 runCheckOnCode<ValueLTransform>(Cat(S)));
147 EXPECT_EQ(Cat("const auto target = f();"),
148 runCheckOnCode<PointeeLTransform>(Cat(S)));
150 EXPECT_EQ(Cat("auto const target = f();"),
151 runCheckOnCode<ValueRTransform>(Cat(S)));
152 EXPECT_EQ(Cat("auto const target = f();"),
153 runCheckOnCode<PointeeRTransform>(Cat(S)));
158 auto Cat = [&T](StringRef S) { return (T + S).str(); };
160 EXPECT_EQ(Cat("const auto target = f();"),
161 runCheckOnCode<ValueLTransform>(Cat(S)));
162 EXPECT_EQ(Cat("const auto target = f();"),
163 runCheckOnCode<PointeeLTransform>(Cat(S)));
165 EXPECT_EQ(Cat("auto const target = f();"),
166 runCheckOnCode<ValueRTransform>(Cat(S)));
167 EXPECT_EQ(Cat("auto const target = f();"),
168 runCheckOnCode<PointeeRTransform>(Cat(S)));
173 auto Cat = [&T](StringRef S) { return (T + S).str(); };
175 EXPECT_EQ(Cat("const decltype(f()) target = f();"),
176 runCheckOnCode<ValueLTransform>(Cat(S)));
177 EXPECT_EQ(Cat("const decltype(f()) target = f();"),
178 runCheckOnCode<PointeeLTransform>(Cat(S)));
180 EXPECT_EQ(Cat("decltype(f()) const target = f();"),
181 runCheckOnCode<ValueRTransform>(Cat(S)));
182 EXPECT_EQ(Cat("decltype(f()) const target = f();"),
183 runCheckOnCode<PointeeRTransform>(Cat(S)));
190 auto Cat = [&T](StringRef S) { return (T + S).str(); };
192 EXPECT_EQ(Cat("const decltype(f()) target = f();"),
193 runCheckOnCode<ValueLTransform>(Cat(S)));
194 EXPECT_EQ(Cat("const decltype(f()) target = f();"),
195 runCheckOnCode<PointeeLTransform>(Cat(S)));
197 EXPECT_EQ(Cat("decltype(f()) const target = f();"),
198 runCheckOnCode<ValueRTransform>(Cat(S)));
199 EXPECT_EQ(Cat("decltype(f()) const target = f();"),
200 runCheckOnCode<PointeeRTransform>(Cat(S)));
208 auto Cat = [&T](StringRef S) { return (T + S).str(); };
210 EXPECT_EQ(Cat("const decltype(f()) target = f();"),
211 runCheckOnCode<ValueLTransform>(Cat(S)));
212 EXPECT_EQ(Cat("const decltype(f()) target = f();"),
213 runCheckOnCode<PointeeLTransform>(Cat(S)));
215 EXPECT_EQ(Cat("decltype(f()) const target = f();"),
216 runCheckOnCode<ValueRTransform>(Cat(S)));
217 EXPECT_EQ(Cat("decltype(f()) const target = f();"),
218 runCheckOnCode<PointeeRTransform>(Cat(S)));
361 auto Cat = [&ArraySnippet](StringRef S) { return (ArraySnippet + S).str(); };
363 EXPECT_EQ(Cat("const int (&target)[4] = a;"),
364 runCheckOnCode<ValueLTransform>(Cat(Snippet)));
365 EXPECT_EQ(Cat("const int (&target)[4] = a;"),
366 runCheckOnCode<PointeeLTransform>(Cat(Snippet)));
368 EXPECT_EQ(Cat("int const(&target)[4] = a;"),
369 runCheckOnCode<ValueRTransform>(Cat(Snippet)));
370 EXPECT_EQ(Cat("int const(&target)[4] = a;"),
371 runCheckOnCode<PointeeRTransform>(Cat(Snippet)));
376 auto Cat = [&T](StringRef S) { return (T + S).str(); };
378 EXPECT_EQ(Cat("const auto& target = f();"),
379 runCheckOnCode<ValueLTransform>(Cat(S)));
380 EXPECT_EQ(Cat("auto const& target = f();"),
381 runCheckOnCode<ValueRTransform>(Cat(S)));
383 EXPECT_EQ(Cat("const auto& target = f();"),
384 runCheckOnCode<PointeeLTransform>(Cat(S)));
385 EXPECT_EQ(Cat("auto const& target = f();"),
386 runCheckOnCode<PointeeRTransform>(Cat(S)));
422 auto Cat = [&ArraySnippet](StringRef S) { return (ArraySnippet + S).str(); };
424 EXPECT_EQ(Cat("int (*const target)[4] = &a;"),
425 runCheckOnCode<ValueLTransform>(Cat(Snippet)));
426 EXPECT_EQ(Cat("const int (*target)[4] = &a;"),
427 runCheckOnCode<PointeeLTransform>(Cat(Snippet)));
429 EXPECT_EQ(Cat("int (*const target)[4] = &a;"),
430 runCheckOnCode<ValueRTransform>(Cat(Snippet)));
431 EXPECT_EQ(Cat("int const(*target)[4] = &a;"),
432 runCheckOnCode<PointeeRTransform>(Cat(Snippet)));
450 auto Cat = [&T](StringRef S) { return (T + S).str(); };
452 EXPECT_EQ(Cat("auto* const target = f();"),
453 runCheckOnCode<ValueLTransform>(Cat(S)));
454 EXPECT_EQ(Cat("auto* const target = f();"),
455 runCheckOnCode<ValueRTransform>(Cat(S)));
457 EXPECT_EQ(Cat("const auto* target = f();"),
458 runCheckOnCode<PointeeLTransform>(Cat(S)));
459 EXPECT_EQ(Cat("auto const* target = f();"),
460 runCheckOnCode<PointeeRTransform>(Cat(S)));
465 auto Cat = [&T](StringRef S) { return (T + S).str(); };
467 EXPECT_EQ(Cat("auto (((* const target))) = f();"),
468 runCheckOnCode<ValueLTransform>(Cat(S)));
469 EXPECT_EQ(Cat("auto (((* const target))) = f();"),
470 runCheckOnCode<ValueRTransform>(Cat(S)));
472 EXPECT_EQ(Cat("const auto (((* target))) = f();"),
473 runCheckOnCode<PointeeLTransform>(Cat(S)));
474 EXPECT_EQ(Cat("auto const(((* target))) = f();"),
475 runCheckOnCode<PointeeRTransform>(Cat(S)));
497 auto Cat = [&T](StringRef S) { return (T + S).str(); };
499 EXPECT_EQ(Cat("int (A::*const target)() = &A::f;"),
500 runCheckOnCode<ValueLTransform>(Cat(S)));
501 EXPECT_EQ(Cat("int (A::*const target)() = &A::f;"),
502 runCheckOnCode<ValueRTransform>(Cat(S)));
504 EXPECT_EQ(Cat("int (A::*const target)() = &A::f;"),
505 runCheckOnCode<PointeeLTransform>(Cat(S)));
506 EXPECT_EQ(Cat("int (A::*const target)() = &A::f;"),
507 runCheckOnCode<PointeeRTransform>(Cat(S)));
510 EXPECT_EQ(Cat("int (A::*const ((target)))() = &A::f;"),
511 runCheckOnCode<ValueLTransform>(Cat(S)));
516 auto Cat = [&T](StringRef S) { return (T + S).str(); };
518 EXPECT_EQ(Cat("int A::*const target = &A::member;"),
519 runCheckOnCode<ValueLTransform>(Cat(S)));
520 EXPECT_EQ(Cat("int A::*const target = &A::member;"),
521 runCheckOnCode<ValueRTransform>(Cat(S)));
523 EXPECT_EQ(Cat("int A::*const target = &A::member;"),
524 runCheckOnCode<PointeeLTransform>(Cat(S)));
525 EXPECT_EQ(Cat("int A::*const target = &A::member;"),
526 runCheckOnCode<PointeeRTransform>(Cat(S)));
529 EXPECT_EQ(Cat("int A::*const ((target)) = &A::member;"),
530 runCheckOnCode<PointeeRTransform>(Cat(S)));
540 auto Cat = [&T](StringRef S) { return (T + S).str(); };
542 EXPECT_EQ(Cat("const struct Foo target{0};"),
543 runCheckOnCode<ValueLTransform>(Cat(S)));
544 EXPECT_EQ(Cat("const struct Foo target{0};"),
545 runCheckOnCode<PointeeLTransform>(Cat(S)));
547 EXPECT_EQ(Cat("struct Foo const target{0};"),
548 runCheckOnCode<ValueRTransform>(Cat(S)));
549 EXPECT_EQ(Cat("struct Foo const target{0};"),
550 runCheckOnCode<PointeeRTransform>(Cat(S)));
553 EXPECT_EQ(Cat("const Foo target{0};"),
554 runCheckOnCode<ValueLTransform>(Cat(S)));
555 EXPECT_EQ(Cat("const Foo target{0};"),
556 runCheckOnCode<PointeeLTransform>(Cat(S)));
558 EXPECT_EQ(Cat("Foo const target{0};"),
559 runCheckOnCode<ValueRTransform>(Cat(S)));
560 EXPECT_EQ(Cat("Foo const target{0};"),
561 runCheckOnCode<PointeeRTransform>(Cat(S)));
564 EXPECT_EQ(Cat("const Foo (target){0};"),
565 runCheckOnCode<ValueLTransform>(Cat(S)));
566 EXPECT_EQ(Cat("const Foo (target){0};"),
567 runCheckOnCode<PointeeLTransform>(Cat(S)));
569 EXPECT_EQ(Cat("Foo const (target){0};"),
570 runCheckOnCode<ValueRTransform>(Cat(S)));
571 EXPECT_EQ(Cat("Foo const (target){0};"),
572 runCheckOnCode<PointeeRTransform>(Cat(S)));
599 auto Cat = [&T](StringRef S) { return (T + S).str(); };
601 EXPECT_EQ(Cat("const class Foo target;"),
602 runCheckOnCode<ValueLTransform>(Cat(S)));
603 EXPECT_EQ(Cat("const class Foo target;"),
604 runCheckOnCode<PointeeLTransform>(Cat(S)));
606 EXPECT_EQ(Cat("class Foo const target;"),
607 runCheckOnCode<ValueRTransform>(Cat(S)));
608 EXPECT_EQ(Cat("class Foo const target;"),
609 runCheckOnCode<PointeeRTransform>(Cat(S)));
612 EXPECT_EQ(Cat("const Foo target;"), runCheckOnCode<ValueLTransform>(Cat(S)));
613 EXPECT_EQ(Cat("const Foo target;"),
614 runCheckOnCode<PointeeLTransform>(Cat(S)));
616 EXPECT_EQ(Cat("Foo const target;"), runCheckOnCode<ValueRTransform>(Cat(S)));
617 EXPECT_EQ(Cat("Foo const target;"),
618 runCheckOnCode<PointeeRTransform>(Cat(S)));
621 EXPECT_EQ(Cat("const Foo (target);"),
622 runCheckOnCode<ValueLTransform>(Cat(S)));
623 EXPECT_EQ(Cat("const Foo (target);"),
624 runCheckOnCode<PointeeLTransform>(Cat(S)));
626 EXPECT_EQ(Cat("Foo const (target);"),
627 runCheckOnCode<ValueRTransform>(Cat(S)));
628 EXPECT_EQ(Cat("Foo const (target);"),
629 runCheckOnCode<PointeeRTransform>(Cat(S)));
634 auto Cat = [&T](StringRef S) { return (T + S).str(); };
636 EXPECT_EQ(Cat("const enum Foo target;"),
637 runCheckOnCode<ValueLTransform>(Cat(S)));
638 EXPECT_EQ(Cat("const enum Foo target;"),
639 runCheckOnCode<PointeeLTransform>(Cat(S)));
641 EXPECT_EQ(Cat("enum Foo const target;"),
642 runCheckOnCode<ValueRTransform>(Cat(S)));
643 EXPECT_EQ(Cat("enum Foo const target;"),
644 runCheckOnCode<PointeeRTransform>(Cat(S)));
647 EXPECT_EQ(Cat("const Foo target;"), runCheckOnCode<ValueLTransform>(Cat(S)));
648 EXPECT_EQ(Cat("const Foo target;"),
649 runCheckOnCode<PointeeLTransform>(Cat(S)));
651 EXPECT_EQ(Cat("Foo const target;"), runCheckOnCode<ValueRTransform>(Cat(S)));
652 EXPECT_EQ(Cat("Foo const target;"),
653 runCheckOnCode<PointeeRTransform>(Cat(S)));
656 EXPECT_EQ(Cat("const Foo (target);"),
657 runCheckOnCode<ValueLTransform>(Cat(S)));
658 EXPECT_EQ(Cat("const Foo (target);"),
659 runCheckOnCode<PointeeLTransform>(Cat(S)));
661 EXPECT_EQ(Cat("Foo const (target);"),
662 runCheckOnCode<ValueRTransform>(Cat(S)));
663 EXPECT_EQ(Cat("Foo const (target);"),
664 runCheckOnCode<PointeeRTransform>(Cat(S)));
669 auto Cat = [&T](StringRef S) { return (T + S).str(); };
671 EXPECT_EQ(Cat("const union Foo target;"),
672 runCheckOnCode<ValueLTransform>(Cat(S)));
673 EXPECT_EQ(Cat("const union Foo target;"),
674 runCheckOnCode<PointeeLTransform>(Cat(S)));
676 EXPECT_EQ(Cat("union Foo const target;"),
677 runCheckOnCode<ValueRTransform>(Cat(S)));
678 EXPECT_EQ(Cat("union Foo const target;"),
679 runCheckOnCode<PointeeRTransform>(Cat(S)));
682 EXPECT_EQ(Cat("const Foo target;"), runCheckOnCode<ValueLTransform>(Cat(S)));
683 EXPECT_EQ(Cat("const Foo target;"),
684 runCheckOnCode<PointeeLTransform>(Cat(S)));
686 EXPECT_EQ(Cat("Foo const target;"), runCheckOnCode<ValueRTransform>(Cat(S)));
687 EXPECT_EQ(Cat("Foo const target;"),
688 runCheckOnCode<PointeeRTransform>(Cat(S)));
691 EXPECT_EQ(Cat("const Foo (target);"),
692 runCheckOnCode<ValueLTransform>(Cat(S)));
693 EXPECT_EQ(Cat("const Foo (target);"),
694 runCheckOnCode<PointeeLTransform>(Cat(S)));
696 EXPECT_EQ(Cat("Foo const (target);"),
697 runCheckOnCode<ValueRTransform>(Cat(S)));
698 EXPECT_EQ(Cat("Foo const (target);"),
699 runCheckOnCode<PointeeRTransform>(Cat(S)));
709 auto Cat = [&T](StringRef S) { return (T + S).str(); };
711 EXPECT_EQ(Cat("DEFINE_VARIABLE;"), runCheckOnCode<ValueLTransform>(Cat(S)));
712 EXPECT_EQ(Cat("DEFINE_VARIABLE;"), runCheckOnCode<ValueRTransform>(Cat(S)));
714 EXPECT_EQ(Cat("DEFINE_VARIABLE;"), runCheckOnCode<PointeeLTransform>(Cat(S)));
715 EXPECT_EQ(Cat("DEFINE_VARIABLE;"), runCheckOnCode<PointeeRTransform>(Cat(S)));
720 auto Cat = [&T](StringRef S) { return (T + S).str(); };
722 EXPECT_EQ(Cat("DEFINE_VARIABLE(target);"),
723 runCheckOnCode<ValueLTransform>(Cat(S)));
724 EXPECT_EQ(Cat("DEFINE_VARIABLE(target);"),
725 runCheckOnCode<ValueRTransform>(Cat(S)));
727 EXPECT_EQ(Cat("DEFINE_VARIABLE(target);"),
728 runCheckOnCode<PointeeLTransform>(Cat(S)));
729 EXPECT_EQ(Cat("DEFINE_VARIABLE(target);"),
730 runCheckOnCode<PointeeRTransform>(Cat(S)));
735 auto Cat = [&T](StringRef S) { return (T + S).str(); };
737 EXPECT_EQ(Cat("BAD_TYPEDEF target = 42;"),
738 runCheckOnCode<ValueLTransform>(Cat(S)));
739 EXPECT_EQ(Cat("BAD_TYPEDEF target = 42;"),
740 runCheckOnCode<PointeeLTransform>(Cat(S)));
742 EXPECT_EQ(Cat("BAD_TYPEDEF const target = 42;"),
743 runCheckOnCode<PointeeRTransform>(Cat(S)));
744 EXPECT_EQ(Cat("BAD_TYPEDEF const target = 42;"),
745 runCheckOnCode<ValueRTransform>(Cat(S)));
750 auto Cat = [&T](StringRef S) { return (T + S).str(); };
752 EXPECT_EQ(Cat("BAD_TYPEDEF const target = nullptr;"),
753 runCheckOnCode<ValueLTransform>(Cat(S)));
754 EXPECT_EQ(Cat("BAD_TYPEDEF const target = nullptr;"),
755 runCheckOnCode<ValueRTransform>(Cat(S)));
759 EXPECT_NE(Cat("BAD_TYPEDEF target = nullptr;"),
760 runCheckOnCode<PointeeRTransform>(Cat(S)));
761 EXPECT_EQ(Cat("BAD_TYPEDEF target = nullptr;"),
762 runCheckOnCode<PointeeLTransform>(Cat(S)));
767 auto Cat = [&T](StringRef S) { return (T + S).str(); };
769 EXPECT_EQ(Cat("BAD_TYPEDEF target = g;"),
770 runCheckOnCode<ValueLTransform>(Cat(S)));
772 EXPECT_NE(Cat("BAD_TYPEDEF target = g;"),
773 runCheckOnCode<ValueRTransform>(Cat(S)));
775 EXPECT_EQ(Cat("BAD_TYPEDEF target = g;"),
776 runCheckOnCode<PointeeLTransform>(Cat(S)));
778 EXPECT_NE(Cat("BAD_TYPEDEF target = g;"),
779 runCheckOnCode<PointeeRTransform>(Cat(S)));
787 auto Cat = [&](StringRef S) { return (M + F + V).str(); };
789 EXPECT_EQ(Cat("{ DEBUG(const int target = 42;); }"),
790 runCheckOnCode<ValueLTransform>(Cat(V)));
791 EXPECT_EQ(Cat("{ DEBUG(int const target = 42;); }"),
792 runCheckOnCode<ValueRTransform>(Cat(V)));
800 auto Cat = [&](StringRef S) { return (M + F + V + E).str(); };
802 EXPECT_EQ(Cat("DEBUG( for(const auto& target: array); );"),
803 runCheckOnCode<ValueLTransform>(Cat(V)));
804 EXPECT_EQ(Cat("DEBUG( for(auto const& target: array); );"),
805 runCheckOnCode<ValueRTransform>(Cat(V)));
828 auto Cat = [&T](StringRef S) { return (T + S).str(); };
830 EXPECT_EQ(Cat("{ const T target = v; }"),
831 runCheckOnCode<ValueLTransform>(Cat(S)));
832 EXPECT_EQ(Cat("{ T const target = v; }"),
833 runCheckOnCode<ValueRTransform>(Cat(S)));
835 EXPECT_EQ(Cat("{ const T target = v; }"),
836 runCheckOnCode<PointeeLTransform>(Cat(S)));
837 EXPECT_EQ(Cat("{ T const target = v; }"),
838 runCheckOnCode<PointeeRTransform>(Cat(S)));
843 auto Cat = [&T](StringRef S) { return (T + S).str(); };
845 EXPECT_EQ(Cat("{ T* const target = v; }"),
846 runCheckOnCode<ValueLTransform>(Cat(S)));
847 EXPECT_EQ(Cat("{ T* const target = v; }"),
848 runCheckOnCode<ValueRTransform>(Cat(S)));
850 EXPECT_EQ(Cat("{ const T* target = v; }"),
851 runCheckOnCode<PointeeLTransform>(Cat(S)));
852 EXPECT_EQ(Cat("{ T const* target = v; }"),
853 runCheckOnCode<PointeeRTransform>(Cat(S)));
858 auto Cat = [&T](StringRef S) { return (T + S).str(); };
860 EXPECT_EQ(Cat("{ const T& target = v; }"),
861 runCheckOnCode<ValueLTransform>(Cat(S)));
862 EXPECT_EQ(Cat("{ T const& target = v; }"),
863 runCheckOnCode<ValueRTransform>(Cat(S)));
865 EXPECT_EQ(Cat("{ const T& target = v; }"),
866 runCheckOnCode<PointeeLTransform>(Cat(S)));
867 EXPECT_EQ(Cat("{ T const& target = v; }"),
868 runCheckOnCode<PointeeRTransform>(Cat(S)));
883 auto Cat = [&](StringRef Target) {
890 EXPECT_EQ(Cat("{ const T target = v; }"),
891 runCheckOnCode<ValueLTransform>(Cat(S)));
892 EXPECT_EQ(Cat("{ T const target = v; }"),
893 runCheckOnCode<ValueRTransform>(Cat(S)));
895 EXPECT_EQ(Cat("{ const T target = v; }"),
896 runCheckOnCode<PointeeLTransform>(Cat(S)));
897 EXPECT_EQ(Cat("{ T const target = v; }"),
898 runCheckOnCode<PointeeRTransform>(Cat(S)));
905 auto Cat = [&T, &End](StringRef S) { return (T + S + End).str(); };
907 EXPECT_EQ(Cat("{ const T target = v; }"),
908 runCheckOnCode<ValueLTransform>(Cat(S)));
909 EXPECT_EQ(Cat("{ T const target = v; }"),
910 runCheckOnCode<ValueRTransform>(Cat(S)));
912 EXPECT_EQ(Cat("{ const T target = v; }"),
913 runCheckOnCode<PointeeLTransform>(Cat(S)));
914 EXPECT_EQ(Cat("{ T const target = v; }"),
915 runCheckOnCode<PointeeRTransform>(Cat(S)));
921 auto Cat = [&T, &End](StringRef S) { return (T + S + End).str(); };
923 EXPECT_EQ(Cat("{ T* const target = v; }"),
924 runCheckOnCode<ValueLTransform>(Cat(S)));
925 EXPECT_EQ(Cat("{ T* const target = v; }"),
926 runCheckOnCode<ValueRTransform>(Cat(S)));
928 EXPECT_EQ(Cat("{ const T* target = v; }"),
929 runCheckOnCode<PointeeLTransform>(Cat(S)));
930 EXPECT_EQ(Cat("{ T const* target = v; }"),
931 runCheckOnCode<PointeeRTransform>(Cat(S)));
937 auto Cat = [&T, &End](StringRef S) { return (T + S + End).str(); };
939 EXPECT_EQ(Cat("{ const T& target = v; }"),
940 runCheckOnCode<ValueLTransform>(Cat(S)));
941 EXPECT_EQ(Cat("{ T const& target = v; }"),
942 runCheckOnCode<ValueRTransform>(Cat(S)));
944 EXPECT_EQ(Cat("{ const T& target = v; }"),
945 runCheckOnCode<PointeeLTransform>(Cat(S)));
946 EXPECT_EQ(Cat("{ T const& target = v; }"),
947 runCheckOnCode<PointeeRTransform>(Cat(S)));
953 auto Cat = [&TS, &T](StringRef S) { return (TS + T + S).str(); };
955 EXPECT_EQ(Cat("{ const typename T::value_type target; }"),
956 runCheckOnCode<ValueLTransform>(Cat(S)));
957 EXPECT_EQ(Cat("{ typename T::value_type const target; }"),
958 runCheckOnCode<ValueRTransform>(Cat(S)));
960 EXPECT_EQ(Cat("{ const typename T::value_type target; }"),
961 runCheckOnCode<PointeeLTransform>(Cat(S)));
962 EXPECT_EQ(Cat("{ typename T::value_type const target; }"),
963 runCheckOnCode<PointeeRTransform>(Cat(S)));
969 auto Cat = [&TS, &T](StringRef S) { return (TS + T + S).str(); };
971 EXPECT_EQ(Cat("{ typename T::value_type *const target; }"),
972 runCheckOnCode<ValueLTransform>(Cat(S)));
973 EXPECT_EQ(Cat("{ typename T::value_type *const target; }"),
974 runCheckOnCode<ValueRTransform>(Cat(S)));
976 EXPECT_EQ(Cat("{ const typename T::value_type *target; }"),
977 runCheckOnCode<PointeeLTransform>(Cat(S)));
978 EXPECT_EQ(Cat("{ typename T::value_type const*target; }"),
979 runCheckOnCode<PointeeRTransform>(Cat(S)));
985 auto Cat = [&TS, &T](StringRef S) { return (TS + T + S).str(); };
987 EXPECT_EQ(Cat("{ const typename T::value_type &target = f; }"),
988 runCheckOnCode<ValueLTransform>(Cat(S)));
989 EXPECT_EQ(Cat("{ typename T::value_type const&target = f; }"),
990 runCheckOnCode<ValueRTransform>(Cat(S)));
992 EXPECT_EQ(Cat("{ const typename T::value_type &target = f; }"),
993 runCheckOnCode<PointeeLTransform>(Cat(S)));
994 EXPECT_EQ(Cat("{ typename T::value_type const&target = f; }"),
995 runCheckOnCode<PointeeRTransform>(Cat(S)));
1001 auto Cat = [&TS, &T](StringRef S) { return (TS + T + S).str(); };
1003 EXPECT_EQ(Cat("{ const TS<int> target(42); }"),
1004 runCheckOnCode<ValueLTransform>(Cat(S)));
1005 EXPECT_EQ(Cat("{ TS<int> const target(42); }"),
1006 runCheckOnCode<ValueRTransform>(Cat(S)));
1008 EXPECT_EQ(Cat("{ const TS<int> target(42); }"),
1009 runCheckOnCode<PointeeLTransform>(Cat(S)));
1010 EXPECT_EQ(Cat("{ TS<int> const target(42); }"),
1011 runCheckOnCode<PointeeRTransform>(Cat(S)));
1018 auto Cat = [&](StringRef S) { return (TS + TS2 + T + S).str(); };
1020 EXPECT_EQ(Cat("{ const TS<double> target(42.42); }"),
1021 runCheckOnCode<ValueLTransform>(Cat(S)));
1022 EXPECT_EQ(Cat("{ TS<double> const target(42.42); }"),
1023 runCheckOnCode<ValueRTransform>(Cat(S)));
1025 EXPECT_EQ(Cat("{ const TS<double> target(42.42); }"),
1026 runCheckOnCode<PointeeLTransform>(Cat(S)));
1027 EXPECT_EQ(Cat("{ TS<double> const target(42.42); }"),
1028 runCheckOnCode<PointeeRTransform>(Cat(S)));
1050 auto Cat = [&](StringRef S) { return (TB + S + TE).str(); };
1053 EXPECT_NE(runCheckOnCode<PointeeLTransform>(Cat(S), nullptr, "input.m"),
1054 Cat("const Object *target;"));
1055 EXPECT_NE(runCheckOnCode<PointeeRTransform>(Cat(S), nullptr, "input.m"),
1056 Cat("Object const*target;"));
1057 EXPECT_NE(runCheckOnCode<ValueLTransform>(Cat(S), nullptr, "input.m"),
1058 Cat("Object *const target;"));
1059 EXPECT_NE(runCheckOnCode<ValueRTransform>(Cat(S), nullptr, "input.m"),
1060 Cat("Object *const target;"));
1066 auto Cat = [&](StringRef S) { return (TB + S + TE).str(); };
1068 EXPECT_EQ(runCheckOnCode<PointeeLTransform>(Cat(S), nullptr, "input.m"),
1069 Cat("- (void) foo: (const int *) target;"));
1070 EXPECT_EQ(runCheckOnCode<PointeeRTransform>(Cat(S), nullptr, "input.m"),
1071 Cat("- (void) foo: (int const*) target;"));
1074 EXPECT_NE(runCheckOnCode<ValueLTransform>(Cat(S), nullptr, "input.m"),
1075 Cat("- (void) foo: (int * const) target;"));
1076 EXPECT_NE(runCheckOnCode<ValueRTransform>(Cat(S), nullptr, "input.m"),
1077 Cat("- (void) foo: (int * const) target;"));