aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/codesearch/testdata/refs.c.json
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/codesearch/testdata/refs.c.json')
-rw-r--r--pkg/codesearch/testdata/refs.c.json157
1 files changed, 157 insertions, 0 deletions
diff --git a/pkg/codesearch/testdata/refs.c.json b/pkg/codesearch/testdata/refs.c.json
new file mode 100644
index 000000000..289ce7c30
--- /dev/null
+++ b/pkg/codesearch/testdata/refs.c.json
@@ -0,0 +1,157 @@
+{
+ "definitions": [
+ {
+ "kind": "function",
+ "name": "long_func_with_ref",
+ "type": "void ()",
+ "body": {
+ "file": "refs.c",
+ "start_line": 23,
+ "end_line": 34
+ },
+ "comment": {},
+ "refs": [
+ {
+ "kind": "calls",
+ "entity_kind": "function",
+ "name": "refs0",
+ "line": 25
+ },
+ {
+ "kind": "calls",
+ "entity_kind": "function",
+ "name": "refs1",
+ "line": 26
+ },
+ {
+ "kind": "calls",
+ "entity_kind": "function",
+ "name": "refs0",
+ "line": 27
+ },
+ {
+ "kind": "calls",
+ "entity_kind": "function",
+ "name": "refs1",
+ "line": 28
+ },
+ {
+ "kind": "calls",
+ "entity_kind": "function",
+ "name": "refs2",
+ "line": 29
+ },
+ {
+ "kind": "takes-address-of",
+ "entity_kind": "function",
+ "name": "refs1",
+ "line": 29
+ },
+ {
+ "kind": "calls",
+ "entity_kind": "function",
+ "name": "refs0",
+ "line": 29
+ },
+ {
+ "kind": "calls",
+ "entity_kind": "function",
+ "name": "refs0",
+ "line": 30
+ },
+ {
+ "kind": "calls",
+ "entity_kind": "function",
+ "name": "refs1",
+ "line": 31
+ },
+ {
+ "kind": "calls",
+ "entity_kind": "function",
+ "name": "refs0",
+ "line": 32
+ },
+ {
+ "kind": "calls",
+ "entity_kind": "function",
+ "name": "refs1",
+ "line": 33
+ }
+ ]
+ },
+ {
+ "kind": "function",
+ "name": "refs0",
+ "type": "int ()",
+ "body": {
+ "file": "refs.c",
+ "start_line": 4,
+ "end_line": 7
+ },
+ "comment": {
+ "file": "refs.c",
+ "start_line": 1,
+ "end_line": 2
+ }
+ },
+ {
+ "kind": "function",
+ "name": "refs1",
+ "type": "void ()",
+ "body": {
+ "file": "refs.c",
+ "start_line": 9,
+ "end_line": 11
+ },
+ "comment": {}
+ },
+ {
+ "kind": "function",
+ "name": "refs2",
+ "type": "void (void (*)(), int)",
+ "body": {
+ "file": "refs.c",
+ "start_line": 13,
+ "end_line": 15
+ },
+ "comment": {}
+ },
+ {
+ "kind": "function",
+ "name": "refs3",
+ "type": "void ()",
+ "body": {
+ "file": "refs.c",
+ "start_line": 17,
+ "end_line": 21
+ },
+ "comment": {},
+ "refs": [
+ {
+ "kind": "calls",
+ "entity_kind": "function",
+ "name": "refs2",
+ "line": 19
+ },
+ {
+ "kind": "takes-address-of",
+ "entity_kind": "function",
+ "name": "refs1",
+ "line": 19
+ },
+ {
+ "kind": "calls",
+ "entity_kind": "function",
+ "name": "refs0",
+ "line": 19
+ },
+ {
+ "kind": "takes-address-of",
+ "entity_kind": "function",
+ "name": "refs2",
+ "line": 20
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file