mirror of
https://github.com/github/semantic.git
synced 2024-12-27 08:54:14 +03:00
1813 lines
72 KiB
JSON
1813 lines
72 KiB
JSON
[{
|
|
"testCaseDescription": "javascript-member-access-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
2,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
15
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
0,
|
|
16
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
16
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"patch": "insert",
|
|
"range": [
|
|
16,
|
|
16
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
16,
|
|
16
|
|
],
|
|
"number": 2
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"member-access.js",
|
|
"member-access.js"
|
|
],
|
|
"oids": [
|
|
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
|
|
"3c837c9ac2210ab22e17256aec6c81255b24a053"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"member-access.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/member-access.js b/member-access.js",
|
|
"index e69de29..3c837c9 100644",
|
|
"--- a/member-access.js",
|
|
"+++ b/member-access.js",
|
|
"@@ -0,0 +1 @@",
|
|
"+x.someProperty;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "6bb7b92e6660b4bea6500b17891e6215571694a1..a7e9f12709231169ce940b7b5adddb8b700c4740"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-member-access-replacement-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
2,
|
|
19
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
19
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
0,
|
|
20
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
20
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
20
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
20,
|
|
21
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
22,
|
|
34
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
20,
|
|
34
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
20,
|
|
35
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
20,
|
|
36
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
20,
|
|
36
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
2,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
15
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
16
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
16
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
36,
|
|
37
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
38,
|
|
50
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
36,
|
|
50
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
36,
|
|
51
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
36,
|
|
52
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
36,
|
|
52
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
16,
|
|
16
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
16,
|
|
16
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
52,
|
|
52
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
52,
|
|
52
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"member-access.js",
|
|
"member-access.js"
|
|
],
|
|
"oids": [
|
|
"3c837c9ac2210ab22e17256aec6c81255b24a053",
|
|
"858131aff5581b39a869c08175f8d36ded551ad7"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"member-access.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/member-access.js b/member-access.js",
|
|
"index 3c837c9..858131a 100644",
|
|
"--- a/member-access.js",
|
|
"+++ b/member-access.js",
|
|
"@@ -1 +1,3 @@",
|
|
"+x.someOtherProperty",
|
|
"+x.someProperty;",
|
|
" x.someProperty;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "a7e9f12709231169ce940b7b5adddb8b700c4740..8a2a90b5c78a4271528ba0098926b1309345cd81"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-member-access-delete-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"patch": "replace",
|
|
"range": [
|
|
2,
|
|
19
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
19
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
20
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
20
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
20
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"patch": "replace",
|
|
"range": [
|
|
2,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
15
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
16
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
16
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
20,
|
|
21
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
22,
|
|
34
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
20,
|
|
34
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
20,
|
|
35
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
20,
|
|
36
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
20,
|
|
36
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
16,
|
|
17
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
18,
|
|
30
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
16,
|
|
30
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
16,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
16,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
16,
|
|
32
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
36,
|
|
37
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
38,
|
|
50
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
36,
|
|
50
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
36,
|
|
51
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
36,
|
|
52
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
36,
|
|
52
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
32,
|
|
33
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
34,
|
|
46
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
46
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
47
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
48
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
32,
|
|
48
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
52,
|
|
52
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
52,
|
|
52
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
48,
|
|
48
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
48,
|
|
48
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"member-access.js",
|
|
"member-access.js"
|
|
],
|
|
"oids": [
|
|
"858131aff5581b39a869c08175f8d36ded551ad7",
|
|
"5ed8a8d239fc6159dcd6c4eda641a3371076c3a6"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"member-access.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/member-access.js b/member-access.js",
|
|
"index 858131a..5ed8a8d 100644",
|
|
"--- a/member-access.js",
|
|
"+++ b/member-access.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-x.someOtherProperty",
|
|
"+x.someProperty;",
|
|
" x.someProperty;",
|
|
" x.someProperty;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "8a2a90b5c78a4271528ba0098926b1309345cd81..b3e91ac2bb642a9f673811cf0f81464baa0d5107"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-member-access-replacement-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"patch": "replace",
|
|
"range": [
|
|
2,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
15
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
16
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
16
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"patch": "replace",
|
|
"range": [
|
|
2,
|
|
19
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
19
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
20
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
20
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
20
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
16,
|
|
17
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
18,
|
|
30
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
16,
|
|
30
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
16,
|
|
31
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
16,
|
|
32
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
16,
|
|
32
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
20,
|
|
21
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
22,
|
|
34
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
20,
|
|
34
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
20,
|
|
35
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
20,
|
|
36
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
20,
|
|
36
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
32,
|
|
33
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
34,
|
|
46
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
46
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
47
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
32,
|
|
48
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
32,
|
|
48
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
36,
|
|
37
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
38,
|
|
50
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
36,
|
|
50
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
36,
|
|
51
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
36,
|
|
52
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
36,
|
|
52
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
48,
|
|
48
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
48,
|
|
48
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
52,
|
|
52
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
52,
|
|
52
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"member-access.js",
|
|
"member-access.js"
|
|
],
|
|
"oids": [
|
|
"5ed8a8d239fc6159dcd6c4eda641a3371076c3a6",
|
|
"858131aff5581b39a869c08175f8d36ded551ad7"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"member-access.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/member-access.js b/member-access.js",
|
|
"index 5ed8a8d..858131a 100644",
|
|
"--- a/member-access.js",
|
|
"+++ b/member-access.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-x.someProperty;",
|
|
"+x.someOtherProperty",
|
|
" x.someProperty;",
|
|
" x.someProperty;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "b3e91ac2bb642a9f673811cf0f81464baa0d5107..a840fc931f382340c5556c4189d2d1794ccc11dd"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-member-access-delete-replacement-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
2,
|
|
19
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
19
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
20
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
20
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
20
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
20,
|
|
21
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
22,
|
|
34
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
20,
|
|
34
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
20,
|
|
35
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
20,
|
|
36
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
20,
|
|
36
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
36,
|
|
37
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
38,
|
|
50
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
36,
|
|
50
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
36,
|
|
51
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
36,
|
|
52
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
36,
|
|
52
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
2,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
15
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
16
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
16
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
16,
|
|
17
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
18,
|
|
35
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
16,
|
|
35
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
16,
|
|
36
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
16,
|
|
36
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
16,
|
|
36
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
52,
|
|
52
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
52,
|
|
52
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
36,
|
|
36
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
36,
|
|
36
|
|
],
|
|
"number": 3
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"member-access.js",
|
|
"member-access.js"
|
|
],
|
|
"oids": [
|
|
"858131aff5581b39a869c08175f8d36ded551ad7",
|
|
"81f5f468eb0e95b890ccdd3e5aaf1fd53361aa03"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"member-access.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/member-access.js b/member-access.js",
|
|
"index 858131a..81f5f46 100644",
|
|
"--- a/member-access.js",
|
|
"+++ b/member-access.js",
|
|
"@@ -1,3 +1,2 @@",
|
|
"-x.someOtherProperty",
|
|
"-x.someProperty;",
|
|
" x.someProperty;",
|
|
"+x.someOtherProperty"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "a840fc931f382340c5556c4189d2d1794ccc11dd..162904a6f6d643b66a5f4b844ba2e228b7dc6c5e"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-member-access-delete-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
2,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
15
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
16
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
16
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
16,
|
|
17
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
18,
|
|
35
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
16,
|
|
35
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
16,
|
|
36
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
16,
|
|
36
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
16,
|
|
36
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
2,
|
|
19
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
19
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
20
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
20
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
20
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
36,
|
|
36
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
36,
|
|
36
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
20,
|
|
20
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
20,
|
|
20
|
|
],
|
|
"number": 2
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"member-access.js",
|
|
"member-access.js"
|
|
],
|
|
"oids": [
|
|
"81f5f468eb0e95b890ccdd3e5aaf1fd53361aa03",
|
|
"8329c7704ddcef58fe0babaebc1e4ff7a3b39979"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"member-access.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/member-access.js b/member-access.js",
|
|
"index 81f5f46..8329c77 100644",
|
|
"--- a/member-access.js",
|
|
"+++ b/member-access.js",
|
|
"@@ -1,2 +1 @@",
|
|
"-x.someProperty;",
|
|
" x.someOtherProperty"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "162904a6f6d643b66a5f4b844ba2e228b7dc6c5e..66de6fe8153911bdce9e1e49b303c1e0fa6f3df9"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-member-access-delete-rest-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "MemberAccess",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
2,
|
|
19
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
19
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
20
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
20
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
20
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"patch": "delete",
|
|
"range": [
|
|
20,
|
|
20
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
20,
|
|
20
|
|
],
|
|
"number": 2
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"member-access.js",
|
|
"member-access.js"
|
|
],
|
|
"oids": [
|
|
"8329c7704ddcef58fe0babaebc1e4ff7a3b39979",
|
|
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"member-access.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/member-access.js b/member-access.js",
|
|
"index 8329c77..e69de29 100644",
|
|
"--- a/member-access.js",
|
|
"+++ b/member-access.js",
|
|
"@@ -1 +0,0 @@",
|
|
"-x.someOtherProperty"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "66de6fe8153911bdce9e1e49b303c1e0fa6f3df9..75ba258ab370ff0efecb47f5f6a2f6a9968e9b8d"
|
|
}]
|