mirror of
https://github.com/github/semantic.git
synced 2024-12-23 23:11:50 +03:00
348 lines
11 KiB
JSON
348 lines
11 KiB
JSON
[{
|
|
"testCaseDescription": "javascript-subscript-access-variable-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"subscript-access-variable.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
16
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x[someVariable]' subscript access"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"subscript-access-variable.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/subscript-access-variable.js b/subscript-access-variable.js",
|
|
"index e69de29..9a7b3d3 100644",
|
|
"--- a/subscript-access-variable.js",
|
|
"+++ b/subscript-access-variable.js",
|
|
"@@ -0,0 +1 @@",
|
|
"+x[someVariable];"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "bcba202e709aea072f614c126e2a5bb356cbf3fe..f506206202b7ba25d0d7002482361368d4484792"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-subscript-access-variable-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"subscript-access-variable.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
21
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x[someOtherVariable]' subscript access"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
16
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x[someVariable]' subscript access"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"subscript-access-variable.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/subscript-access-variable.js b/subscript-access-variable.js",
|
|
"index 9a7b3d3..000d190 100644",
|
|
"--- a/subscript-access-variable.js",
|
|
"+++ b/subscript-access-variable.js",
|
|
"@@ -1 +1,3 @@",
|
|
"+x[someOtherVariable];",
|
|
"+x[someVariable];",
|
|
" x[someVariable];"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "f506206202b7ba25d0d7002482361368d4484792..bc70d1984738705b4df815056d104a56f917365b"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-subscript-access-variable-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"subscript-access-variable.js": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
3
|
|
],
|
|
"end": [
|
|
1,
|
|
20
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
3
|
|
],
|
|
"end": [
|
|
1,
|
|
15
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'someOtherVariable' identifier with the 'someVariable' identifier in the x[someVariable] subscript access"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"subscript-access-variable.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/subscript-access-variable.js b/subscript-access-variable.js",
|
|
"index 000d190..01f61ef 100644",
|
|
"--- a/subscript-access-variable.js",
|
|
"+++ b/subscript-access-variable.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-x[someOtherVariable];",
|
|
"+x[someVariable];",
|
|
" x[someVariable];",
|
|
" x[someVariable];"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "bc70d1984738705b4df815056d104a56f917365b..912cf4a3c64ca194b5497e5fd9730ea2311d3947"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-subscript-access-variable-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"subscript-access-variable.js": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
3
|
|
],
|
|
"end": [
|
|
1,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
3
|
|
],
|
|
"end": [
|
|
1,
|
|
20
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'someVariable' identifier with the 'someOtherVariable' identifier in the x[someOtherVariable] subscript access"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"subscript-access-variable.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/subscript-access-variable.js b/subscript-access-variable.js",
|
|
"index 01f61ef..000d190 100644",
|
|
"--- a/subscript-access-variable.js",
|
|
"+++ b/subscript-access-variable.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-x[someVariable];",
|
|
"+x[someOtherVariable];",
|
|
" x[someVariable];",
|
|
" x[someVariable];"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "912cf4a3c64ca194b5497e5fd9730ea2311d3947..2b501586eba02bbd8e3ea2313ae892d24672a95d"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-subscript-access-variable-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"subscript-access-variable.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
21
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x[someOtherVariable]' subscript access"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
16
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x[someVariable]' subscript access"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
21
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x[someOtherVariable]' subscript access"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"subscript-access-variable.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/subscript-access-variable.js b/subscript-access-variable.js",
|
|
"index 000d190..2aaae7e 100644",
|
|
"--- a/subscript-access-variable.js",
|
|
"+++ b/subscript-access-variable.js",
|
|
"@@ -1,3 +1,2 @@",
|
|
"-x[someOtherVariable];",
|
|
"-x[someVariable];",
|
|
" x[someVariable];",
|
|
"+x[someOtherVariable];"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "2b501586eba02bbd8e3ea2313ae892d24672a95d..188b43fc4ab2de0e499492f21c5b24308c26e908"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-subscript-access-variable-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"subscript-access-variable.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
16
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x[someVariable]' subscript access"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"subscript-access-variable.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/subscript-access-variable.js b/subscript-access-variable.js",
|
|
"index 2aaae7e..baa3661 100644",
|
|
"--- a/subscript-access-variable.js",
|
|
"+++ b/subscript-access-variable.js",
|
|
"@@ -1,2 +1 @@",
|
|
"-x[someVariable];",
|
|
" x[someOtherVariable];"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "188b43fc4ab2de0e499492f21c5b24308c26e908..386de21b188a783b6a0a9b5c024f0c92082dbfde"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-subscript-access-variable-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"subscript-access-variable.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
21
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x[someOtherVariable]' subscript access"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"subscript-access-variable.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/subscript-access-variable.js b/subscript-access-variable.js",
|
|
"index baa3661..e69de29 100644",
|
|
"--- a/subscript-access-variable.js",
|
|
"+++ b/subscript-access-variable.js",
|
|
"@@ -1 +0,0 @@",
|
|
"-x[someOtherVariable];"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "386de21b188a783b6a0a9b5c024f0c92082dbfde..b6fd9fdbec2e79ee92f6829605a2e1a54a1784ba"
|
|
}]
|