mirror of
https://github.com/github/semantic.git
synced 2024-12-23 23:11:50 +03:00
402 lines
14 KiB
JSON
402 lines
14 KiB
JSON
[{
|
|
"testCaseDescription": "javascript-for-loop-with-in-statement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"for-loop-with-in-statement.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
63
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'key in something && i = 0; i < n; i++' for statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"for-loop-with-in-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/for-loop-with-in-statement.js b/for-loop-with-in-statement.js",
|
|
"index e69de29..c467478 100644",
|
|
"--- a/for-loop-with-in-statement.js",
|
|
"+++ b/for-loop-with-in-statement.js",
|
|
"@@ -0,0 +1 @@",
|
|
"+for (key in something && i = 0; i < n; i++) { doSomething(); }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "1c2dbb18fb6fc930b3d0e6bb31a559a853be5c63..974a2623d96129b8a5eb74659c0040931fe6597a"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-for-loop-with-in-statement-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"for-loop-with-in-statement.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
73
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'otherKey in something && i = 0; i < n; i++' for statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
63
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'key in something && i = 0; i < n; i++' for statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"for-loop-with-in-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/for-loop-with-in-statement.js b/for-loop-with-in-statement.js",
|
|
"index c467478..0147d31 100644",
|
|
"--- a/for-loop-with-in-statement.js",
|
|
"+++ b/for-loop-with-in-statement.js",
|
|
"@@ -1 +1,3 @@",
|
|
"+for (otherKey in something && i = 0; i < n; i++) { doOtherSomething(); }",
|
|
"+for (key in something && i = 0; i < n; i++) { doSomething(); }",
|
|
" for (key in something && i = 0; i < n; i++) { doSomething(); }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "974a2623d96129b8a5eb74659c0040931fe6597a..37f9b64351b20f87cdd2d65e794e8b43ea684959"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-for-loop-with-in-statement-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"for-loop-with-in-statement.js": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
6
|
|
],
|
|
"end": [
|
|
1,
|
|
14
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
6
|
|
],
|
|
"end": [
|
|
1,
|
|
9
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'otherKey' identifier with the 'key' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
52
|
|
],
|
|
"end": [
|
|
1,
|
|
68
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
47
|
|
],
|
|
"end": [
|
|
1,
|
|
58
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'doOtherSomething' identifier with the 'doSomething' identifier in the doSomething() function call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"for-loop-with-in-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/for-loop-with-in-statement.js b/for-loop-with-in-statement.js",
|
|
"index 0147d31..306fa88 100644",
|
|
"--- a/for-loop-with-in-statement.js",
|
|
"+++ b/for-loop-with-in-statement.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-for (otherKey in something && i = 0; i < n; i++) { doOtherSomething(); }",
|
|
"+for (key in something && i = 0; i < n; i++) { doSomething(); }",
|
|
" for (key in something && i = 0; i < n; i++) { doSomething(); }",
|
|
" for (key in something && i = 0; i < n; i++) { doSomething(); }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "37f9b64351b20f87cdd2d65e794e8b43ea684959..639c4e9d99aa30a48f0403a42eaf81f85a194e22"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-for-loop-with-in-statement-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"for-loop-with-in-statement.js": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
6
|
|
],
|
|
"end": [
|
|
1,
|
|
9
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
6
|
|
],
|
|
"end": [
|
|
1,
|
|
14
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'key' identifier with the 'otherKey' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
47
|
|
],
|
|
"end": [
|
|
1,
|
|
58
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
52
|
|
],
|
|
"end": [
|
|
1,
|
|
68
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'doSomething' identifier with the 'doOtherSomething' identifier in the doOtherSomething() function call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"for-loop-with-in-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/for-loop-with-in-statement.js b/for-loop-with-in-statement.js",
|
|
"index 306fa88..0147d31 100644",
|
|
"--- a/for-loop-with-in-statement.js",
|
|
"+++ b/for-loop-with-in-statement.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-for (key in something && i = 0; i < n; i++) { doSomething(); }",
|
|
"+for (otherKey in something && i = 0; i < n; i++) { doOtherSomething(); }",
|
|
" for (key in something && i = 0; i < n; i++) { doSomething(); }",
|
|
" for (key in something && i = 0; i < n; i++) { doSomething(); }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "639c4e9d99aa30a48f0403a42eaf81f85a194e22..8d475ef797fcd08a47c73f033c305642c4279115"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-for-loop-with-in-statement-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"for-loop-with-in-statement.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
73
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'otherKey in something && i = 0; i < n; i++' for statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
63
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'key in something && i = 0; i < n; i++' for statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
73
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'otherKey in something && i = 0; i < n; i++' for statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"for-loop-with-in-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/for-loop-with-in-statement.js b/for-loop-with-in-statement.js",
|
|
"index 0147d31..f23fa31 100644",
|
|
"--- a/for-loop-with-in-statement.js",
|
|
"+++ b/for-loop-with-in-statement.js",
|
|
"@@ -1,3 +1,2 @@",
|
|
"-for (otherKey in something && i = 0; i < n; i++) { doOtherSomething(); }",
|
|
"-for (key in something && i = 0; i < n; i++) { doSomething(); }",
|
|
" for (key in something && i = 0; i < n; i++) { doSomething(); }",
|
|
"+for (otherKey in something && i = 0; i < n; i++) { doOtherSomething(); }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "8d475ef797fcd08a47c73f033c305642c4279115..d2051aee8f163a567cf3a5ff4060579795e0a2a1"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-for-loop-with-in-statement-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"for-loop-with-in-statement.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
63
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'key in something && i = 0; i < n; i++' for statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"for-loop-with-in-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/for-loop-with-in-statement.js b/for-loop-with-in-statement.js",
|
|
"index f23fa31..e968160 100644",
|
|
"--- a/for-loop-with-in-statement.js",
|
|
"+++ b/for-loop-with-in-statement.js",
|
|
"@@ -1,2 +1 @@",
|
|
"-for (key in something && i = 0; i < n; i++) { doSomething(); }",
|
|
" for (otherKey in something && i = 0; i < n; i++) { doOtherSomething(); }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "d2051aee8f163a567cf3a5ff4060579795e0a2a1..068a5eccf07c8be3b3a95d6eceadf7062d7b942d"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-for-loop-with-in-statement-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"for-loop-with-in-statement.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
73
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'otherKey in something && i = 0; i < n; i++' for statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"for-loop-with-in-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/for-loop-with-in-statement.js b/for-loop-with-in-statement.js",
|
|
"index e968160..e69de29 100644",
|
|
"--- a/for-loop-with-in-statement.js",
|
|
"+++ b/for-loop-with-in-statement.js",
|
|
"@@ -1 +0,0 @@",
|
|
"-for (otherKey in something && i = 0; i < n; i++) { doOtherSomething(); }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "068a5eccf07c8be3b3a95d6eceadf7062d7b942d..9c2fa1f20200ecb26074ec348c75c13c22138f87"
|
|
}]
|