mirror of
https://github.com/github/semantic.git
synced 2024-12-22 22:31:36 +03:00
1813 lines
71 KiB
JSON
1813 lines
71 KiB
JSON
[{
|
|
"testCaseDescription": "javascript-assignment-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
4,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
0,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
7
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"patch": "insert",
|
|
"range": [
|
|
7,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
7,
|
|
7
|
|
],
|
|
"number": 2
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"assignment.js",
|
|
"assignment.js"
|
|
],
|
|
"oids": [
|
|
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
|
|
"6882fe5e9b61219ab73752afdc310b095bfe745d"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"assignment.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/assignment.js b/assignment.js",
|
|
"index e69de29..6882fe5 100644",
|
|
"--- a/assignment.js",
|
|
"+++ b/assignment.js",
|
|
"@@ -0,0 +1 @@",
|
|
"+x = 0;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "aa5f6a7c2031a5c8823a005dffbe948bd997e140..f5d468945963e06f4af8f37da1f4b43c6f7dc89b"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-assignment-replacement-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
4,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
7
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
7,
|
|
8
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
11,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
7,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
7,
|
|
13
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
7,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
7,
|
|
14
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
4,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
7
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
14,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
18,
|
|
19
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
19
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
20
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
21
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
14,
|
|
21
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
7,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
7,
|
|
7
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
21,
|
|
21
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
21,
|
|
21
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"assignment.js",
|
|
"assignment.js"
|
|
],
|
|
"oids": [
|
|
"6882fe5e9b61219ab73752afdc310b095bfe745d",
|
|
"fb4cba44067ebf39e2fd6f2141e6f37a06092835"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"assignment.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/assignment.js b/assignment.js",
|
|
"index 6882fe5..fb4cba4 100644",
|
|
"--- a/assignment.js",
|
|
"+++ b/assignment.js",
|
|
"@@ -1 +1,3 @@",
|
|
"+x = 1;",
|
|
"+x = 0;",
|
|
" x = 0;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "f5d468945963e06f4af8f37da1f4b43c6f7dc89b..079aadf7d837be3f3cbaa970bda8df4f24ca9dfd"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-assignment-delete-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"patch": "replace",
|
|
"range": [
|
|
4,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
7
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"patch": "replace",
|
|
"range": [
|
|
4,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
7
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
7,
|
|
8
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
11,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
7,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
7,
|
|
13
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
7,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
7,
|
|
14
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
7,
|
|
8
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
11,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
7,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
7,
|
|
13
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
7,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
7,
|
|
14
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
14,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
18,
|
|
19
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
19
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
20
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
21
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
14,
|
|
21
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
14,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
18,
|
|
19
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
19
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
20
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
21
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
14,
|
|
21
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
21,
|
|
21
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
21,
|
|
21
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
21,
|
|
21
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
21,
|
|
21
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"assignment.js",
|
|
"assignment.js"
|
|
],
|
|
"oids": [
|
|
"fb4cba44067ebf39e2fd6f2141e6f37a06092835",
|
|
"42e16c611cdbe3ec9b3bb6a364f3c0f9fb57844f"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"assignment.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/assignment.js b/assignment.js",
|
|
"index fb4cba4..42e16c6 100644",
|
|
"--- a/assignment.js",
|
|
"+++ b/assignment.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-x = 1;",
|
|
"+x = 0;",
|
|
" x = 0;",
|
|
" x = 0;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "079aadf7d837be3f3cbaa970bda8df4f24ca9dfd..59dc3f7b9aa4067d998fe7a7167d25a879597bbe"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-assignment-replacement-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"patch": "replace",
|
|
"range": [
|
|
4,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
7
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"patch": "replace",
|
|
"range": [
|
|
4,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
7
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
7,
|
|
8
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
11,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
7,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
7,
|
|
13
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
7,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
7,
|
|
14
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
7,
|
|
8
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
11,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
7,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
7,
|
|
13
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
7,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
7,
|
|
14
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
14,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
18,
|
|
19
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
19
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
20
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
21
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
14,
|
|
21
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
14,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
18,
|
|
19
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
19
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
20
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
21
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
14,
|
|
21
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
21,
|
|
21
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
21,
|
|
21
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
21,
|
|
21
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
21,
|
|
21
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"assignment.js",
|
|
"assignment.js"
|
|
],
|
|
"oids": [
|
|
"42e16c611cdbe3ec9b3bb6a364f3c0f9fb57844f",
|
|
"fb4cba44067ebf39e2fd6f2141e6f37a06092835"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"assignment.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/assignment.js b/assignment.js",
|
|
"index 42e16c6..fb4cba4 100644",
|
|
"--- a/assignment.js",
|
|
"+++ b/assignment.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-x = 0;",
|
|
"+x = 1;",
|
|
" x = 0;",
|
|
" x = 0;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "59dc3f7b9aa4067d998fe7a7167d25a879597bbe..7a05860458ff8fe37877bd3105ddd6cae586b0cf"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-assignment-delete-replacement-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
4,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
7
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
7,
|
|
8
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
11,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
7,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
7,
|
|
13
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
7,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
7,
|
|
14
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
14,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
18,
|
|
19
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
19
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
20
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
14,
|
|
21
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
14,
|
|
21
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
4,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
7
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
7,
|
|
8
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
11,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
7,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
7,
|
|
13
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
7,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
7,
|
|
14
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
21,
|
|
21
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
21,
|
|
21
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
14,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
14,
|
|
14
|
|
],
|
|
"number": 3
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"assignment.js",
|
|
"assignment.js"
|
|
],
|
|
"oids": [
|
|
"fb4cba44067ebf39e2fd6f2141e6f37a06092835",
|
|
"11fe15d7f4c6042ed39993811cb54e0f3cd3ac83"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"assignment.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/assignment.js b/assignment.js",
|
|
"index fb4cba4..11fe15d 100644",
|
|
"--- a/assignment.js",
|
|
"+++ b/assignment.js",
|
|
"@@ -1,3 +1,2 @@",
|
|
"-x = 1;",
|
|
"-x = 0;",
|
|
" x = 0;",
|
|
"+x = 1;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "7a05860458ff8fe37877bd3105ddd6cae586b0cf..b815835af80b7e47423649f4ac97477d00069b02"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-assignment-delete-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
4,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
7
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
7,
|
|
8
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
11,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
7,
|
|
12
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
7,
|
|
13
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
7,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
7,
|
|
14
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
4,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
7
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
14,
|
|
14
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
14,
|
|
14
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
7,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
7,
|
|
7
|
|
],
|
|
"number": 2
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"assignment.js",
|
|
"assignment.js"
|
|
],
|
|
"oids": [
|
|
"11fe15d7f4c6042ed39993811cb54e0f3cd3ac83",
|
|
"198b8f89e758aee0adce3806353120c3b674937d"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"assignment.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/assignment.js b/assignment.js",
|
|
"index 11fe15d..198b8f8 100644",
|
|
"--- a/assignment.js",
|
|
"+++ b/assignment.js",
|
|
"@@ -1,2 +1 @@",
|
|
"-x = 0;",
|
|
" x = 1;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "b815835af80b7e47423649f4ac97477d00069b02..5524702d577596f2531f09de1af7369cbc54b582"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-assignment-delete-rest-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "ExpressionStatements",
|
|
"children": [
|
|
{
|
|
"category": "Assignment",
|
|
"children": [
|
|
{
|
|
"category": "Identifier",
|
|
"range": [
|
|
0,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"category": "NumberLiteral",
|
|
"range": [
|
|
4,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
5
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
6
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
7
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"patch": "delete",
|
|
"range": [
|
|
7,
|
|
7
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
7,
|
|
7
|
|
],
|
|
"number": 2
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"assignment.js",
|
|
"assignment.js"
|
|
],
|
|
"oids": [
|
|
"198b8f89e758aee0adce3806353120c3b674937d",
|
|
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"assignment.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/assignment.js b/assignment.js",
|
|
"index 198b8f8..e69de29 100644",
|
|
"--- a/assignment.js",
|
|
"+++ b/assignment.js",
|
|
"@@ -1 +0,0 @@",
|
|
"-x = 1;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "5524702d577596f2531f09de1af7369cbc54b582..30a517ace94526eae9f09618d7cc587cdbb96c25"
|
|
}]
|