[clang-tools-extra] r271270 - [find-all-symbols] Add a test to make sure merging actually works.
Benjamin Kramer via cfe-commits
cfe-commits at lists.llvm.org
Tue May 31 05:12:20 PDT 2016
Author: d0k
Date: Tue May 31 07:12:19 2016
New Revision: 271270
URL: http://llvm.org/viewvc/llvm-project?rev=271270&view=rev
Log:
[find-all-symbols] Add a test to make sure merging actually works.
Added:
clang-tools-extra/trunk/test/include-fixer/Inputs/merge/
clang-tools-extra/trunk/test/include-fixer/Inputs/merge/a.yaml
clang-tools-extra/trunk/test/include-fixer/Inputs/merge/b.yaml
clang-tools-extra/trunk/test/include-fixer/merge.test
Modified:
clang-tools-extra/trunk/test/CMakeLists.txt
clang-tools-extra/trunk/test/lit.cfg
Modified: clang-tools-extra/trunk/test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/CMakeLists.txt?rev=271270&r1=271269&r2=271270&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/CMakeLists.txt (original)
+++ clang-tools-extra/trunk/test/CMakeLists.txt Tue May 31 07:12:19 2016
@@ -46,6 +46,7 @@ set(CLANG_TOOLS_TEST_DEPS
clang-query
clang-rename
clang-tidy
+ find-all-symbols
modularize
pp-trace
Added: clang-tools-extra/trunk/test/include-fixer/Inputs/merge/a.yaml
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/include-fixer/Inputs/merge/a.yaml?rev=271270&view=auto
==============================================================================
--- clang-tools-extra/trunk/test/include-fixer/Inputs/merge/a.yaml (added)
+++ clang-tools-extra/trunk/test/include-fixer/Inputs/merge/a.yaml Tue May 31 07:12:19 2016
@@ -0,0 +1,20 @@
+---
+Name: foo
+Contexts:
+ - ContextType: Namespace
+ ContextName: a
+FilePath: foo.h
+LineNumber: 1
+Type: Class
+NumOccurrences: 1
+...
+---
+Name: bar
+Contexts:
+ - ContextType: Namespace
+ ContextName: a
+FilePath: ../include/bar.h
+LineNumber: 1
+Type: Class
+NumOccurrences: 1
+...
Added: clang-tools-extra/trunk/test/include-fixer/Inputs/merge/b.yaml
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/include-fixer/Inputs/merge/b.yaml?rev=271270&view=auto
==============================================================================
--- clang-tools-extra/trunk/test/include-fixer/Inputs/merge/b.yaml (added)
+++ clang-tools-extra/trunk/test/include-fixer/Inputs/merge/b.yaml Tue May 31 07:12:19 2016
@@ -0,0 +1,20 @@
+---
+Name: foo
+Contexts:
+ - ContextType: Namespace
+ ContextName: a
+FilePath: foo.h
+LineNumber: 1
+Type: Class
+NumOccurrences: 1
+...
+---
+Name: bar
+Contexts:
+ - ContextType: Namespace
+ ContextName: a
+FilePath: ../include/barbar.h
+LineNumber: 1
+Type: Class
+NumOccurrences: 1
+...
Added: clang-tools-extra/trunk/test/include-fixer/merge.test
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/include-fixer/merge.test?rev=271270&view=auto
==============================================================================
--- clang-tools-extra/trunk/test/include-fixer/merge.test (added)
+++ clang-tools-extra/trunk/test/include-fixer/merge.test Tue May 31 07:12:19 2016
@@ -0,0 +1,34 @@
+# REQUIRES: shell
+# RUN: find-all-symbols -merge-dir=%S/Inputs/merge %t.merged
+# RUN: sed '/^#/d' %s > %t.golden
+# RUN: diff -u %t.golden %t.merged
+---
+Name: bar
+Contexts:
+ - ContextType: Namespace
+ ContextName: a
+FilePath: ../include/bar.h
+LineNumber: 1
+Type: Class
+NumOccurrences: 1
+...
+---
+Name: bar
+Contexts:
+ - ContextType: Namespace
+ ContextName: a
+FilePath: ../include/barbar.h
+LineNumber: 1
+Type: Class
+NumOccurrences: 1
+...
+---
+Name: foo
+Contexts:
+ - ContextType: Namespace
+ ContextName: a
+FilePath: foo.h
+LineNumber: 1
+Type: Class
+NumOccurrences: 2
+...
Modified: clang-tools-extra/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/lit.cfg?rev=271270&r1=271269&r2=271270&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/lit.cfg (original)
+++ clang-tools-extra/trunk/test/lit.cfg Tue May 31 07:12:19 2016
@@ -44,7 +44,7 @@ config.test_format = lit.formats.ShTest(
# suffixes: A list of file extensions to treat as test files.
config.suffixes = ['.c', '.cpp', '.hpp', '.m', '.mm', '.cu', '.ll', '.cl', '.s',
- '.modularize', '.module-map-checker']
+ '.modularize', '.module-map-checker', '.test']
# Test-time dependencies located in directories called 'Inputs' are excluded
# from test suites; there won't be any lit tests within them.
More information about the cfe-commits
mailing list