mirror of
https://github.com/github/semantic.git
synced 2024-12-26 00:12:29 +03:00
456 lines
15 KiB
JSON
456 lines
15 KiB
JSON
[{
|
|
"testCaseDescription": "javascript-for-in-statement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"for-in-statement.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
35
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'thing in things' for statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"for-in-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/for-in-statement.js b/for-in-statement.js",
|
|
"index e69de29..f928287 100644",
|
|
"--- a/for-in-statement.js",
|
|
"+++ b/for-in-statement.js",
|
|
"@@ -0,0 +1 @@",
|
|
"+for (thing in things) { thing(); }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "75f87f22428c68545ebb3f876a1b09caf59d75c9..1d91306ffc69509679ae514ecc2a3403dc94aefb"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-for-in-statement-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"for-in-statement.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
32
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'item in items' for statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
35
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'thing in things' for statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"for-in-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/for-in-statement.js b/for-in-statement.js",
|
|
"index f928287..4a482e9 100644",
|
|
"--- a/for-in-statement.js",
|
|
"+++ b/for-in-statement.js",
|
|
"@@ -1 +1,3 @@",
|
|
"+for (item in items) { item(); }",
|
|
"+for (thing in things) { thing(); }",
|
|
" for (thing in things) { thing(); }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "1d91306ffc69509679ae514ecc2a3403dc94aefb..2f951d1d02db4475f786a87f7077648822ef26d3"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-for-in-statement-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"for-in-statement.js": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
6
|
|
],
|
|
"end": [
|
|
1,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
6
|
|
],
|
|
"end": [
|
|
1,
|
|
11
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'item' identifier with the 'thing' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
14
|
|
],
|
|
"end": [
|
|
1,
|
|
19
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
15
|
|
],
|
|
"end": [
|
|
1,
|
|
21
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'items' identifier with the 'things' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
23
|
|
],
|
|
"end": [
|
|
1,
|
|
27
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
25
|
|
],
|
|
"end": [
|
|
1,
|
|
30
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'item' identifier with the 'thing' identifier in the thing() function call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"for-in-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/for-in-statement.js b/for-in-statement.js",
|
|
"index 4a482e9..e949baf 100644",
|
|
"--- a/for-in-statement.js",
|
|
"+++ b/for-in-statement.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-for (item in items) { item(); }",
|
|
"+for (thing in things) { thing(); }",
|
|
" for (thing in things) { thing(); }",
|
|
" for (thing in things) { thing(); }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "2f951d1d02db4475f786a87f7077648822ef26d3..31f13f455d1c9d9efae42c7695abae57acf4684a"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-for-in-statement-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"for-in-statement.js": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
6
|
|
],
|
|
"end": [
|
|
1,
|
|
11
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
6
|
|
],
|
|
"end": [
|
|
1,
|
|
10
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'thing' identifier with the 'item' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
15
|
|
],
|
|
"end": [
|
|
1,
|
|
21
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
14
|
|
],
|
|
"end": [
|
|
1,
|
|
19
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'things' identifier with the 'items' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
25
|
|
],
|
|
"end": [
|
|
1,
|
|
30
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
23
|
|
],
|
|
"end": [
|
|
1,
|
|
27
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'thing' identifier with the 'item' identifier in the item() function call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"for-in-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/for-in-statement.js b/for-in-statement.js",
|
|
"index e949baf..4a482e9 100644",
|
|
"--- a/for-in-statement.js",
|
|
"+++ b/for-in-statement.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-for (thing in things) { thing(); }",
|
|
"+for (item in items) { item(); }",
|
|
" for (thing in things) { thing(); }",
|
|
" for (thing in things) { thing(); }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "31f13f455d1c9d9efae42c7695abae57acf4684a..20bf2c4356e71329f5e131bec7be78669308acc8"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-for-in-statement-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"for-in-statement.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
32
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'item in items' for statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
35
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'thing in things' for statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
32
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'item in items' for statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"for-in-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/for-in-statement.js b/for-in-statement.js",
|
|
"index 4a482e9..6b5f12a 100644",
|
|
"--- a/for-in-statement.js",
|
|
"+++ b/for-in-statement.js",
|
|
"@@ -1,3 +1,2 @@",
|
|
"-for (item in items) { item(); }",
|
|
"-for (thing in things) { thing(); }",
|
|
" for (thing in things) { thing(); }",
|
|
"+for (item in items) { item(); }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "20bf2c4356e71329f5e131bec7be78669308acc8..cc6e8abe393b4d3c5e2b919a60c832b78ad0a4cd"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-for-in-statement-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"for-in-statement.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
35
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'thing in things' for statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"for-in-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/for-in-statement.js b/for-in-statement.js",
|
|
"index 6b5f12a..a3d8882 100644",
|
|
"--- a/for-in-statement.js",
|
|
"+++ b/for-in-statement.js",
|
|
"@@ -1,2 +1 @@",
|
|
"-for (thing in things) { thing(); }",
|
|
" for (item in items) { item(); }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "cc6e8abe393b4d3c5e2b919a60c832b78ad0a4cd..71a7b11ea45ba6cae99bbc5d1bdad0c7eb526a3b"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-for-in-statement-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"for-in-statement.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
32
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'item in items' for statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"for-in-statement.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/for-in-statement.js b/for-in-statement.js",
|
|
"index a3d8882..e69de29 100644",
|
|
"--- a/for-in-statement.js",
|
|
"+++ b/for-in-statement.js",
|
|
"@@ -1 +0,0 @@",
|
|
"-for (item in items) { item(); }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "71a7b11ea45ba6cae99bbc5d1bdad0c7eb526a3b..d1b2bee18a7da4fefa2a4786b2f692fc5795f48c"
|
|
}]
|