diff options
Diffstat (limited to 'test/clang-include-fixer/Inputs')
-rw-r--r-- | test/clang-include-fixer/Inputs/database_template.json | 7 | ||||
-rw-r--r-- | test/clang-include-fixer/Inputs/fake_yaml_db.yaml | 71 | ||||
-rw-r--r-- | test/clang-include-fixer/Inputs/merge/a.yaml | 20 | ||||
-rw-r--r-- | test/clang-include-fixer/Inputs/merge/b.yaml | 20 |
4 files changed, 118 insertions, 0 deletions
diff --git a/test/clang-include-fixer/Inputs/database_template.json b/test/clang-include-fixer/Inputs/database_template.json new file mode 100644 index 00000000..ec71c562 --- /dev/null +++ b/test/clang-include-fixer/Inputs/database_template.json @@ -0,0 +1,7 @@ +[ +{ + "directory": "test_dir/build", + "command": "clang++ -I../include -o bar.o test_dir/src/bar.cpp", + "file": "test_dir/src/bar.cpp" +} +] diff --git a/test/clang-include-fixer/Inputs/fake_yaml_db.yaml b/test/clang-include-fixer/Inputs/fake_yaml_db.yaml new file mode 100644 index 00000000..134b3758 --- /dev/null +++ b/test/clang-include-fixer/Inputs/fake_yaml_db.yaml @@ -0,0 +1,71 @@ +--- +Name: foo +Contexts: + - ContextType: Namespace + ContextName: a + - ContextType: Namespace + ContextName: b +FilePath: foo.h +Type: Class +Seen: 1 +Used: 0 +--- +Name: foo_bar +Contexts: + - ContextType: Namespace + ContextName: a + - ContextType: Namespace + ContextName: b +FilePath: foobar.h +Type: Class +Seen: 0 +Used: 0 +--- +Name: bar +Contexts: + - ContextType: Namespace + ContextName: a + - ContextType: Namespace + ContextName: b +FilePath: ../include/bar.h +Type: Class +Seen: 1 +Used: 0 +--- +Name: bar +Contexts: + - ContextType: Namespace + ContextName: a + - ContextType: Namespace + ContextName: b +FilePath: ../include/bar.h +Type: Class +Seen: 3 +Used: 0 +--- +Name: bar +Contexts: + - ContextType: Namespace + ContextName: a + - ContextType: Namespace + ContextName: b +FilePath: ../include/zbar.h +Type: Class +Seen: 3 +Used: 0 +--- +Name: b +Contexts: +FilePath: var.h +Type: Variable +Seen: 1 +Used: 0 +--- +Name: bar +Contexts: + - ContextType: Namespace + ContextName: c +FilePath: test/clang-include-fixer/baz.h +Type: Class +Seen: 1 +Used: 0 diff --git a/test/clang-include-fixer/Inputs/merge/a.yaml b/test/clang-include-fixer/Inputs/merge/a.yaml new file mode 100644 index 00000000..174db0e5 --- /dev/null +++ b/test/clang-include-fixer/Inputs/merge/a.yaml @@ -0,0 +1,20 @@ +--- +Name: foo +Contexts: + - ContextType: Namespace + ContextName: a +FilePath: foo.h +Type: Class +Seen: 1 +Used: 1 +... +--- +Name: bar +Contexts: + - ContextType: Namespace + ContextName: a +FilePath: ../include/bar.h +Type: Class +Seen: 1 +Used: 2 +... diff --git a/test/clang-include-fixer/Inputs/merge/b.yaml b/test/clang-include-fixer/Inputs/merge/b.yaml new file mode 100644 index 00000000..86893208 --- /dev/null +++ b/test/clang-include-fixer/Inputs/merge/b.yaml @@ -0,0 +1,20 @@ +--- +Name: foo +Contexts: + - ContextType: Namespace + ContextName: a +FilePath: foo.h +Type: Class +Seen: 1 +Used: 2 +... +--- +Name: bar +Contexts: + - ContextType: Namespace + ContextName: a +FilePath: ../include/barbar.h +Type: Class +Seen: 1 +Used: 0 +... |