mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
1631 lines
51 KiB
JSON
1631 lines
51 KiB
JSON
[{
|
|
"testCaseDescription": "javascript-comment-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"range": [
|
|
0,
|
|
21
|
|
]
|
|
}
|
|
],
|
|
"patch": "insert",
|
|
"range": [
|
|
0,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
22
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"patch": "insert",
|
|
"range": [
|
|
22,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
22,
|
|
22
|
|
],
|
|
"number": 2
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"comment.js",
|
|
"comment.js"
|
|
],
|
|
"oids": [
|
|
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391",
|
|
"a5821d24d27222b5f5b8024ed74f0f7f339d877d"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"comment.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/comment.js b/comment.js",
|
|
"index e69de29..a5821d2 100644",
|
|
"--- a/comment.js",
|
|
"+++ b/comment.js",
|
|
"@@ -0,0 +1 @@",
|
|
"+// This is a property"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "b7c92617e1bc8e5fbcf483a8ea69e94339a33a4a..cf7c951b9c8ee1023cae2d7a32317a4362912261"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-comment-replacement-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"patch": "insert",
|
|
"range": [
|
|
0,
|
|
3
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
3
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
3
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"patch": "insert",
|
|
"range": [
|
|
3,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
3,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
3,
|
|
23
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"patch": "insert",
|
|
"range": [
|
|
23,
|
|
25
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
23,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
23,
|
|
26
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"patch": "insert",
|
|
"range": [
|
|
26,
|
|
47
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
26,
|
|
48
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
26,
|
|
48
|
|
],
|
|
"number": 4
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"range": [
|
|
0,
|
|
21
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
22
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"range": [
|
|
48,
|
|
69
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
48,
|
|
70
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
48,
|
|
70
|
|
],
|
|
"number": 5
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
22,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
22,
|
|
22
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
70,
|
|
70
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
70,
|
|
70
|
|
],
|
|
"number": 6
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"comment.js",
|
|
"comment.js"
|
|
],
|
|
"oids": [
|
|
"a5821d24d27222b5f5b8024ed74f0f7f339d877d",
|
|
"761aa7a3b13e167bf6b4e800787ddbf677bee26b"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"comment.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/comment.js b/comment.js",
|
|
"index a5821d2..761aa7a 100644",
|
|
"--- a/comment.js",
|
|
"+++ b/comment.js",
|
|
"@@ -1 +1,5 @@",
|
|
"+/*",
|
|
"+ * This is a method",
|
|
"+*/",
|
|
"+// This is a property",
|
|
" // This is a property"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "cf7c951b9c8ee1023cae2d7a32317a4362912261..df64e896d53420fe0c45f73e4a7cd026b432de2c"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-comment-delete-insert-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"patch": "replace",
|
|
"range": [
|
|
0,
|
|
3
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
3
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
3
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"patch": "replace",
|
|
"range": [
|
|
0,
|
|
21
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
22
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"patch": "replace",
|
|
"range": [
|
|
3,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
3,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
3,
|
|
23
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"patch": "replace",
|
|
"range": [
|
|
23,
|
|
25
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
23,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
23,
|
|
26
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"range": [
|
|
26,
|
|
47
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
26,
|
|
48
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
26,
|
|
48
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"range": [
|
|
22,
|
|
43
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
22,
|
|
44
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
22,
|
|
44
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"range": [
|
|
48,
|
|
69
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
48,
|
|
70
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
48,
|
|
70
|
|
],
|
|
"number": 5
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"range": [
|
|
44,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
44,
|
|
66
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
44,
|
|
66
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
70,
|
|
70
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
70,
|
|
70
|
|
],
|
|
"number": 6
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
66,
|
|
66
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
66,
|
|
66
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"comment.js",
|
|
"comment.js"
|
|
],
|
|
"oids": [
|
|
"761aa7a3b13e167bf6b4e800787ddbf677bee26b",
|
|
"3b33406a01816465ab4e84b83e2815cf7db929e5"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"comment.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/comment.js b/comment.js",
|
|
"index 761aa7a..3b33406 100644",
|
|
"--- a/comment.js",
|
|
"+++ b/comment.js",
|
|
"@@ -1,5 +1,3 @@",
|
|
"-/*",
|
|
"- * This is a method",
|
|
"-*/",
|
|
"+// This is a property",
|
|
" // This is a property",
|
|
" // This is a property"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "df64e896d53420fe0c45f73e4a7cd026b432de2c..d66aef0291587fde4d520e86c9f50340aa83dc17"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-comment-replacement-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"patch": "replace",
|
|
"range": [
|
|
0,
|
|
21
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
22
|
|
],
|
|
"number": 1
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"patch": "replace",
|
|
"range": [
|
|
0,
|
|
3
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
3
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
3
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"patch": "replace",
|
|
"range": [
|
|
3,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
3,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
3,
|
|
23
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"patch": "replace",
|
|
"range": [
|
|
23,
|
|
25
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
23,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
23,
|
|
26
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"range": [
|
|
22,
|
|
43
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
22,
|
|
44
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
22,
|
|
44
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"range": [
|
|
26,
|
|
47
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
26,
|
|
48
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
26,
|
|
48
|
|
],
|
|
"number": 4
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"range": [
|
|
44,
|
|
65
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
44,
|
|
66
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
44,
|
|
66
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"range": [
|
|
48,
|
|
69
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
48,
|
|
70
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
48,
|
|
70
|
|
],
|
|
"number": 5
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
66,
|
|
66
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
66,
|
|
66
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
70,
|
|
70
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
70,
|
|
70
|
|
],
|
|
"number": 6
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"comment.js",
|
|
"comment.js"
|
|
],
|
|
"oids": [
|
|
"3b33406a01816465ab4e84b83e2815cf7db929e5",
|
|
"761aa7a3b13e167bf6b4e800787ddbf677bee26b"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"comment.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/comment.js b/comment.js",
|
|
"index 3b33406..761aa7a 100644",
|
|
"--- a/comment.js",
|
|
"+++ b/comment.js",
|
|
"@@ -1,3 +1,5 @@",
|
|
"-// This is a property",
|
|
"+/*",
|
|
"+ * This is a method",
|
|
"+*/",
|
|
" // This is a property",
|
|
" // This is a property"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "d66aef0291587fde4d520e86c9f50340aa83dc17..7f0b4f05b850cba13b1f73b0c3a673c27c41c69f"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-comment-delete-replacement-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
3
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
3
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
3
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"patch": "delete",
|
|
"range": [
|
|
3,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
3,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
3,
|
|
23
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"patch": "delete",
|
|
"range": [
|
|
23,
|
|
25
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
23,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
23,
|
|
26
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"patch": "delete",
|
|
"range": [
|
|
26,
|
|
47
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
26,
|
|
48
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
26,
|
|
48
|
|
],
|
|
"number": 4
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"range": [
|
|
48,
|
|
69
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
48,
|
|
70
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
48,
|
|
70
|
|
],
|
|
"number": 5
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"range": [
|
|
0,
|
|
21
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
22
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"patch": "insert",
|
|
"range": [
|
|
22,
|
|
25
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
22,
|
|
25
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
22,
|
|
25
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"patch": "insert",
|
|
"range": [
|
|
25,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
25,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
25,
|
|
45
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"patch": "insert",
|
|
"range": [
|
|
45,
|
|
47
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
45,
|
|
48
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
45,
|
|
48
|
|
],
|
|
"number": 4
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
70,
|
|
70
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
70,
|
|
70
|
|
],
|
|
"number": 6
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
48,
|
|
48
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
48,
|
|
48
|
|
],
|
|
"number": 5
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"comment.js",
|
|
"comment.js"
|
|
],
|
|
"oids": [
|
|
"761aa7a3b13e167bf6b4e800787ddbf677bee26b",
|
|
"c2a8148ac79eb59d05d153c2d7470b73ec1848c6"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"comment.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/comment.js b/comment.js",
|
|
"index 761aa7a..c2a8148 100644",
|
|
"--- a/comment.js",
|
|
"+++ b/comment.js",
|
|
"@@ -1,5 +1,4 @@",
|
|
"+// This is a property",
|
|
" /*",
|
|
" * This is a method",
|
|
" */",
|
|
"-// This is a property",
|
|
"-// This is a property"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "7f0b4f05b850cba13b1f73b0c3a673c27c41c69f..7f6aeb575b8b29a59634bee8f9992d33a7326ad5"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-comment-delete-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
21
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
22
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
22
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"range": [
|
|
22,
|
|
25
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
22,
|
|
25
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
22,
|
|
25
|
|
],
|
|
"number": 2
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"range": [
|
|
0,
|
|
3
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
0,
|
|
3
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
0,
|
|
3
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"range": [
|
|
25,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
25,
|
|
45
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
25,
|
|
45
|
|
],
|
|
"number": 3
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"range": [
|
|
3,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
3,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
3,
|
|
23
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"range": [
|
|
45,
|
|
47
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
45,
|
|
48
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
45,
|
|
48
|
|
],
|
|
"number": 4
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"range": [
|
|
23,
|
|
25
|
|
]
|
|
}
|
|
],
|
|
"range": [
|
|
23,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
23,
|
|
26
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
48,
|
|
48
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
48,
|
|
48
|
|
],
|
|
"number": 5
|
|
},
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"range": [
|
|
26,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": false,
|
|
"range": [
|
|
26,
|
|
26
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"comment.js",
|
|
"comment.js"
|
|
],
|
|
"oids": [
|
|
"c2a8148ac79eb59d05d153c2d7470b73ec1848c6",
|
|
"7c74dcdf6bb8fb8f0b945321c9c2d23da6a9973d"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"comment.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/comment.js b/comment.js",
|
|
"index c2a8148..7c74dcd 100644",
|
|
"--- a/comment.js",
|
|
"+++ b/comment.js",
|
|
"@@ -1,4 +1,3 @@",
|
|
"-// This is a property",
|
|
" /*",
|
|
" * This is a method",
|
|
" */"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "7f6aeb575b8b29a59634bee8f9992d33a7326ad5..e4fd4adee259b94d3c2fd1f48c1b61c2489f6d13"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-comment-delete-rest-test",
|
|
"expectedResult": {
|
|
"rows": [
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"range": [
|
|
0,
|
|
3
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
0,
|
|
3
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
0,
|
|
3
|
|
],
|
|
"number": 1
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"range": [
|
|
3,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
3,
|
|
23
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
3,
|
|
23
|
|
],
|
|
"number": 2
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [
|
|
{
|
|
"category": "Comment",
|
|
"range": [
|
|
23,
|
|
25
|
|
]
|
|
}
|
|
],
|
|
"patch": "delete",
|
|
"range": [
|
|
23,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
23,
|
|
26
|
|
],
|
|
"number": 3
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"terms": [
|
|
{
|
|
"category": "Program",
|
|
"children": [],
|
|
"patch": "delete",
|
|
"range": [
|
|
26,
|
|
26
|
|
]
|
|
}
|
|
],
|
|
"hasChanges": true,
|
|
"range": [
|
|
26,
|
|
26
|
|
],
|
|
"number": 4
|
|
}
|
|
]
|
|
],
|
|
"paths": [
|
|
"comment.js",
|
|
"comment.js"
|
|
],
|
|
"oids": [
|
|
"7c74dcdf6bb8fb8f0b945321c9c2d23da6a9973d",
|
|
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"
|
|
]
|
|
},
|
|
"filePaths": [
|
|
"comment.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/comment.js b/comment.js",
|
|
"index 7c74dcd..e69de29 100644",
|
|
"--- a/comment.js",
|
|
"+++ b/comment.js",
|
|
"@@ -1,3 +0,0 @@",
|
|
"-/*",
|
|
"- * This is a method",
|
|
"-*/"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "e4fd4adee259b94d3c2fd1f48c1b61c2489f6d13..954df1246c20f230e519c9fb74e256a93cd3e92a"
|
|
}]
|