| 1 | // RUN: mkdir -p %T/no-move-macro-helper |
| 2 | // RUN: cat %S/Inputs/macro_helper_test.h > %T/no-move-macro-helper/macro_helper_test.h |
| 3 | // RUN: cat %S/Inputs/macro_helper_test.cpp > %T/no-move-macro-helper/macro_helper_test.cpp |
| 4 | // RUN: cd %T/no-move-macro-helper |
| 5 | // |
| 6 | // ----------------------------------------------------------------------------- |
| 7 | // Test no moving helpers in macro. |
| 8 | // ----------------------------------------------------------------------------- |
| 9 | // RUN: clang-move -names="A" -new_cc=%T/no-move-macro-helper/new_test.cpp -new_header=%T/no-move-macro-helper/new_test.h -old_cc=%T/no-move-macro-helper/macro_helper_test.cpp -old_header=%T/no-move-macro-helper/macro_helper_test.h %T/no-move-macro-helper/macro_helper_test.cpp -- -std=c++11 |
| 10 | // RUN: FileCheck -input-file=%T/no-move-macro-helper/new_test.h -check-prefix=CHECK-NEW-TEST-CASE1-H %s |
| 11 | // RUN: FileCheck -input-file=%T/no-move-macro-helper/new_test.cpp -check-prefix=CHECK-NEW-TEST-CASE1-CPP %s |
| 12 | // RUN: FileCheck -input-file=%T/no-move-macro-helper/macro_helper_test.h -check-prefix=CHECK-OLD-TEST-CASE1-H %s |
| 13 | // RUN: FileCheck -input-file=%T/no-move-macro-helper/macro_helper_test.cpp -check-prefix=CHECK-OLD-TEST-CASE1-CPP %s |
| 14 | |
| 15 | // CHECK-NEW-TEST-CASE1-H: class A {}; |
| 16 | |
| 17 | // CHECK-OLD-TEST-CASE1-H-NOT: class A {}; |
| 18 | |
| 19 | // CHECK-OLD-TEST-CASE1-CPP: DEFINE(test) |
| 20 | |
| 21 | // CHECK-NEW-TEST-CASE1-CPP-NOT: DEFINE(test) |
| 22 | |
| 23 | |
| 24 | // ----------------------------------------------------------------------------- |
| 25 | // Test moving all. |
| 26 | // ----------------------------------------------------------------------------- |
| 27 | // RUN: cat %S/Inputs/macro_helper_test.h > %T/no-move-macro-helper/macro_helper_test.h |
| 28 | // RUN: cat %S/Inputs/macro_helper_test.cpp > %T/no-move-macro-helper/macro_helper_test.cpp |
| 29 | // RUN: clang-move -names="A, f1" -new_cc=%T/no-move-macro-helper/new_test.cpp -new_header=%T/no-move-macro-helper/new_test.h -old_cc=%T/no-move-macro-helper/macro_helper_test.cpp -old_header=%T/no-move-macro-helper/macro_helper_test.h %T/no-move-macro-helper/macro_helper_test.cpp -- -std=c++11 |
| 30 | // |
| 31 | // RUN: FileCheck -input-file=%T/no-move-macro-helper/new_test.h -check-prefix=CHECK-NEW-TEST-CASE2-H %s |
| 32 | // RUN: FileCheck -input-file=%T/no-move-macro-helper/new_test.cpp -check-prefix=CHECK-NEW-TEST-CASE2-CPP %s |
| 33 | // RUN: FileCheck -input-file=%T/no-move-macro-helper/macro_helper_test.h -allow-empty -check-prefix=CHECK-EMPTY %s |
| 34 | // RUN: FileCheck -input-file=%T/no-move-macro-helper/macro_helper_test.cpp -allow-empty -check-prefix=CHECK-EMPTY %s |
| 35 | |
| 36 | // CHECK-NEW-TEST-CASE2-H: class A {}; |
| 37 | // CHECK-NEW-TEST-CASE2-H-NEXT:void f1(); |
| 38 | |
| 39 | |
| 40 | // CHECK-NEW-TEST-CASE2-CPP: DEFINE(test) |
| 41 | // CHECK-NEW-TEST-CASE2-CPP: void f1() {} |
| 42 | |
| 43 | // CHECK-EMPTY: {{^}}{{$}} |
| 44 | |