diff options
author | Renato Golin <renato.golin@linaro.org> | 2016-10-07 13:58:10 +0000 |
---|---|---|
committer | Renato Golin <renato.golin@linaro.org> | 2016-10-07 13:58:10 +0000 |
commit | 019a7c85c2861274c96eed94a6158a47f98f3aa7 (patch) | |
tree | dc3065faab3dd0c553f2308d14c2d56bd53b6809 /clang-tools-extra/test/clang-move | |
parent | aaed03656227678a11d456be06666bd420a1e3a9 (diff) |
Revert "[clang-move] Support moving multiple classes in one run."
This reverts commit r283526 et al as it keeps randomly breaking bots, even after
the commit has gone, on other people's commit ranges.
Revert "[clang-move] Simplify lint tests" (r283545).
Revert "Fix buildbot error." (r283534).
Revert "Revert "fix buildbot error" since it is not right fix." (r283538).
Diffstat (limited to 'clang-tools-extra/test/clang-move')
5 files changed, 11 insertions, 117 deletions
diff --git a/clang-tools-extra/test/clang-move/Inputs/database_template.json b/clang-tools-extra/test/clang-move/Inputs/database_template.json new file mode 100644 index 00000000000..2dc567ba2b0 --- /dev/null +++ b/clang-tools-extra/test/clang-move/Inputs/database_template.json @@ -0,0 +1,7 @@ +[ +{ + "directory": "$test_dir/build", + "command": "clang++ -o test.o $test_dir/test.cpp", + "file": "$test_dir/test.cpp" +} +] diff --git a/clang-tools-extra/test/clang-move/Inputs/multiple_class_test.cpp b/clang-tools-extra/test/clang-move/Inputs/multiple_class_test.cpp deleted file mode 100644 index 302475baf0f..00000000000 --- a/clang-tools-extra/test/clang-move/Inputs/multiple_class_test.cpp +++ /dev/null @@ -1,27 +0,0 @@ -#include "multiple_class_test.h" - -namespace a { -int Move1::f() { - return 0; -} -} // namespace a - -namespace b { -int Move2::f() { - return 0; -} -} // namespace b - -namespace c { -int Move3::f() { - return 0; -} - -int Move4::f() { - return 0; -} - -int NoMove::f() { - return 0; -} -} // namespace c diff --git a/clang-tools-extra/test/clang-move/Inputs/multiple_class_test.h b/clang-tools-extra/test/clang-move/Inputs/multiple_class_test.h deleted file mode 100644 index cedb8d58b0c..00000000000 --- a/clang-tools-extra/test/clang-move/Inputs/multiple_class_test.h +++ /dev/null @@ -1,30 +0,0 @@ -namespace a { -class Move1 { -public: - int f(); -}; -} // namespace a - -namespace b { -class Move2 { -public: - int f(); -}; -} // namespace b - -namespace c { -class Move3 { -public: - int f(); -}; - -class Move4 { -public: - int f(); -}; - -class NoMove { -public: - int f(); -}; -} // namespace c diff --git a/clang-tools-extra/test/clang-move/move-class.cpp b/clang-tools-extra/test/clang-move/move-class.cpp index 8c7c5e5dafa..0c23608a9e9 100644 --- a/clang-tools-extra/test/clang-move/move-class.cpp +++ b/clang-tools-extra/test/clang-move/move-class.cpp @@ -1,8 +1,9 @@ -// RUN: mkdir -p %T/clang-move +// RUN: mkdir -p %T/clang-move/build +// RUN: sed 's|$test_dir|%/T/clang-move|g' %S/Inputs/database_template.json > %T/clang-move/compile_commands.json // RUN: cp %S/Inputs/test* %T/clang-move/ // RUN: touch %T/clang-move/test2.h // RUN: cd %T/clang-move -// RUN: clang-move -names="a::Foo" -new_cc=%T/clang-move/new_test.cpp -new_header=%T/clang-move/new_test.h -old_cc=../clang-move/test.cpp -old_header=../clang-move/test.h %T/clang-move/test.cpp -- +// RUN: clang-move -name="a::Foo" -new_cc=%T/clang-move/new_test.cpp -new_header=%T/clang-move/new_test.h -old_cc=../clang-move/test.cpp -old_header=../clang-move/test.h %T/clang-move/test.cpp // RUN: FileCheck -input-file=%T/clang-move/new_test.cpp -check-prefix=CHECK-NEW-TEST-CPP %s // RUN: FileCheck -input-file=%T/clang-move/new_test.h -check-prefix=CHECK-NEW-TEST-H %s // RUN: FileCheck -input-file=%T/clang-move/test.cpp -check-prefix=CHECK-OLD-TEST-CPP %s @@ -10,7 +11,7 @@ // // RUN: cp %S/Inputs/test* %T/clang-move/ // RUN: cd %T/clang-move -// RUN: clang-move -names="a::Foo" -new_cc=%T/clang-move/new_test.cpp -new_header=%T/clang-move/new_test.h -old_cc=%T/clang-move/test.cpp -old_header=%T/clang-move/test.h %T/clang-move/test.cpp -- +// RUN: clang-move -name="a::Foo" -new_cc=%T/clang-move/new_test.cpp -new_header=%T/clang-move/new_test.h -old_cc=%T/clang-move/test.cpp -old_header=%T/clang-move/test.h %T/clang-move/test.cpp // RUN: FileCheck -input-file=%T/clang-move/new_test.cpp -check-prefix=CHECK-NEW-TEST-CPP %s // RUN: FileCheck -input-file=%T/clang-move/new_test.h -check-prefix=CHECK-NEW-TEST-H %s // RUN: FileCheck -input-file=%T/clang-move/test.cpp -check-prefix=CHECK-OLD-TEST-CPP %s diff --git a/clang-tools-extra/test/clang-move/move-multiple-classes.cpp b/clang-tools-extra/test/clang-move/move-multiple-classes.cpp deleted file mode 100644 index 5a3e3c3b228..00000000000 --- a/clang-tools-extra/test/clang-move/move-multiple-classes.cpp +++ /dev/null @@ -1,57 +0,0 @@ -// RUN: mkdir -p %T/clang-move -// RUN: cp %S/Inputs/multiple_class_test* %T/clang-move/ -// RUN: cd %T/clang-move -// RUN: clang-move -names="a::Move1, b::Move2,c::Move3,c::Move4" -new_cc=%T/clang-move/new_multiple_class_test.cpp -new_header=%T/clang-move/new_multiple_class_test.h -old_cc=%T/clang-move/multiple_class_test.cpp -old_header=../clang-move/multiple_class_test.h %T/clang-move/multiple_class_test.cpp -- -// RUN: FileCheck -input-file=%T/clang-move/new_multiple_class_test.cpp -check-prefix=CHECK-NEW-TEST-CPP %s -// RUN: FileCheck -input-file=%T/clang-move/new_multiple_class_test.h -check-prefix=CHECK-NEW-TEST-H %s -// RUN: FileCheck -input-file=%T/clang-move/multiple_class_test.cpp -check-prefix=CHECK-OLD-TEST-CPP %s -// RUN: FileCheck -input-file=%T/clang-move/multiple_class_test.h -check-prefix=CHECK-OLD-TEST-H %s -// -// CHECK-OLD-TEST-H: namespace c { -// CHECK-OLD-TEST-H: class NoMove { -// CHECK-OLD-TEST-H: public: -// CHECK-OLD-TEST-H: int f(); -// CHECK-OLD-TEST-H: }; -// CHECK-OLD-TEST-H: } // namespace c - -// CHECK-OLD-TEST-CPP: #include "{{.*}}multiple_class_test.h" -// CHECK-OLD-TEST-CPP: namespace c { -// CHECK-OLD-TEST-CPP: int NoMove::f() { -// CHECK-OLD-TEST-CPP: return 0; -// CHECK-OLD-TEST-CPP: } -// CHECK-OLD-TEST-CPP: } // namespace c - -// CHECK-NEW-TEST-H: namespace a { -// CHECK-NEW-TEST-H: class Move1 { -// CHECK-NEW-TEST-H: public: -// CHECK-NEW-TEST-H: int f(); -// CHECK-NEW-TEST-H: }; -// CHECK-NEW-TEST-H: } // namespace a -// CHECK-NEW-TEST-H: namespace b { -// CHECK-NEW-TEST-H: class Move2 { -// CHECK-NEW-TEST-H: public: -// CHECK-NEW-TEST-H: int f(); -// CHECK-NEW-TEST-H: }; -// CHECK-NEW-TEST-H: } // namespace b -// CHECK-NEW-TEST-H: namespace c { -// CHECK-NEW-TEST-H: class Move3 { -// CHECK-NEW-TEST-H: public: -// CHECK-NEW-TEST-H: int f(); -// CHECK-NEW-TEST-H: }; -// CHECK-NEW-TEST-H: class Move4 { -// CHECK-NEW-TEST-H: public: -// CHECK-NEW-TEST-H: int f(); -// CHECK-NEW-TEST-H: }; -// CHECK-NEW-TEST-H: } // namespace c - -// CHECK-NEW-TEST-CPP: #include "{{.*}}new_multiple_class_test.h" -// CHECK-NEW-TEST-CPP: namespace a { -// CHECK-NEW-TEST-CPP: int Move1::f() { return 0; } -// CHECK-NEW-TEST-CPP: } // namespace a -// CHECK-NEW-TEST-CPP: namespace b { -// CHECK-NEW-TEST-CPP: int Move2::f() { return 0; } -// CHECK-NEW-TEST-CPP: } // namespace b -// CHECK-NEW-TEST-CPP: namespace c { -// CHECK-NEW-TEST-CPP: int Move3::f() { return 0; } -// CHECK-NEW-TEST-CPP: int Move4::f() { return 0; } -// CHECK-NEW-TEST-CPP: } // namespace c |