diff options
author | Haojian Wu <hokein@google.com> | 2016-10-07 12:35:37 +0000 |
---|---|---|
committer | Haojian Wu <hokein@google.com> | 2016-10-07 12:35:37 +0000 |
commit | 5ba2ccacbae08302d1c1b6716d12b783e194ca36 (patch) | |
tree | 4092aace9fdb827c3f7ccbab68668b8cb26de73c /clang-tools-extra/test/clang-move | |
parent | dcf7087d5134271f4f7364810c63502f689260ab (diff) |
[clang-move] Simplify lint tests
No need to use compilation database.
Diffstat (limited to 'clang-tools-extra/test/clang-move')
3 files changed, 5 insertions, 19 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 deleted file mode 100644 index daff4e54b2e..00000000000 --- a/clang-tools-extra/test/clang-move/Inputs/database_template.json +++ /dev/null @@ -1,12 +0,0 @@ -[ -{ - "directory": "$test_dir/build", - "command": "clang++ -o test.o $test_dir/test.cpp", - "file": "$test_dir/test.cpp" -}, -{ - "directory": "$test_dir/build", - "command": "clang++ -o test.o $test_dir/multiple_class_test.cpp", - "file": "$test_dir/multiple_class_test.cpp" -} -] diff --git a/clang-tools-extra/test/clang-move/move-class.cpp b/clang-tools-extra/test/clang-move/move-class.cpp index af49cf5e1e5..8c7c5e5dafa 100644 --- a/clang-tools-extra/test/clang-move/move-class.cpp +++ b/clang-tools-extra/test/clang-move/move-class.cpp @@ -1,9 +1,8 @@ -// 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: mkdir -p %T/clang-move // 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 -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: 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 @@ -11,7 +10,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 -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: 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 index 0633099789e..5a3e3c3b228 100644 --- a/clang-tools-extra/test/clang-move/move-multiple-classes.cpp +++ b/clang-tools-extra/test/clang-move/move-multiple-classes.cpp @@ -1,8 +1,7 @@ -// 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: 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: 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 |