1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 00:12:29 +03:00
semantic/test/corpus/diff-summaries/javascript/for-of-statement.json
2016-11-03 16:02:56 -07:00

456 lines
15 KiB
JSON

[{
"testCaseDescription": "javascript-for-of-statement-insert-test",
"expectedResult": {
"changes": {
"for-of-statement.js": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
43
]
}
},
"summary": "Added the 'item of items' for statement"
}
]
},
"errors": {}
},
"filePaths": [
"for-of-statement.js"
],
"patch": [
"diff --git a/for-of-statement.js b/for-of-statement.js",
"index e69de29..1ed2754 100644",
"--- a/for-of-statement.js",
"+++ b/for-of-statement.js",
"@@ -0,0 +1 @@",
"+for (let item of items) { process(item); };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "9c2fa1f20200ecb26074ec348c75c13c22138f87..c46e44d842f77789f61d1f25221f0449f2d580c5"
}
,{
"testCaseDescription": "javascript-for-of-statement-replacement-insert-test",
"expectedResult": {
"changes": {
"for-of-statement.js": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
46
]
}
},
"summary": "Added the 'thing of things' for statement"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
43
]
}
},
"summary": "Added the 'item of items' for statement"
}
]
},
"errors": {}
},
"filePaths": [
"for-of-statement.js"
],
"patch": [
"diff --git a/for-of-statement.js b/for-of-statement.js",
"index 1ed2754..ab20ded 100644",
"--- a/for-of-statement.js",
"+++ b/for-of-statement.js",
"@@ -1 +1,3 @@",
"+for (let thing of things) { process(thing); };",
"+for (let item of items) { process(item); };",
" for (let item of items) { process(item); };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "c46e44d842f77789f61d1f25221f0449f2d580c5..1c06836a9dafef9518b54b9409dc10e9e4402666"
}
,{
"testCaseDescription": "javascript-for-of-statement-delete-insert-test",
"expectedResult": {
"changes": {
"for-of-statement.js": [
{
"span": {
"replace": [
{
"start": [
1,
10
],
"end": [
1,
15
]
},
{
"start": [
1,
10
],
"end": [
1,
14
]
}
]
},
"summary": "Replaced the 'thing' identifier with the 'item' identifier"
},
{
"span": {
"replace": [
{
"start": [
1,
19
],
"end": [
1,
25
]
},
{
"start": [
1,
18
],
"end": [
1,
23
]
}
]
},
"summary": "Replaced the 'things' identifier with the 'items' identifier"
},
{
"span": {
"replace": [
{
"start": [
1,
37
],
"end": [
1,
42
]
},
{
"start": [
1,
35
],
"end": [
1,
39
]
}
]
},
"summary": "Replaced the 'thing' identifier with the 'item' identifier in the process(item) function call"
}
]
},
"errors": {}
},
"filePaths": [
"for-of-statement.js"
],
"patch": [
"diff --git a/for-of-statement.js b/for-of-statement.js",
"index ab20ded..19561a3 100644",
"--- a/for-of-statement.js",
"+++ b/for-of-statement.js",
"@@ -1,3 +1,3 @@",
"-for (let thing of things) { process(thing); };",
"+for (let item of items) { process(item); };",
" for (let item of items) { process(item); };",
" for (let item of items) { process(item); };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "1c06836a9dafef9518b54b9409dc10e9e4402666..4c79ce75c12d7e2b77bd33d6f7e4f1d839ee88a8"
}
,{
"testCaseDescription": "javascript-for-of-statement-replacement-test",
"expectedResult": {
"changes": {
"for-of-statement.js": [
{
"span": {
"replace": [
{
"start": [
1,
10
],
"end": [
1,
14
]
},
{
"start": [
1,
10
],
"end": [
1,
15
]
}
]
},
"summary": "Replaced the 'item' identifier with the 'thing' identifier"
},
{
"span": {
"replace": [
{
"start": [
1,
18
],
"end": [
1,
23
]
},
{
"start": [
1,
19
],
"end": [
1,
25
]
}
]
},
"summary": "Replaced the 'items' identifier with the 'things' identifier"
},
{
"span": {
"replace": [
{
"start": [
1,
35
],
"end": [
1,
39
]
},
{
"start": [
1,
37
],
"end": [
1,
42
]
}
]
},
"summary": "Replaced the 'item' identifier with the 'thing' identifier in the process(thing) function call"
}
]
},
"errors": {}
},
"filePaths": [
"for-of-statement.js"
],
"patch": [
"diff --git a/for-of-statement.js b/for-of-statement.js",
"index 19561a3..ab20ded 100644",
"--- a/for-of-statement.js",
"+++ b/for-of-statement.js",
"@@ -1,3 +1,3 @@",
"-for (let item of items) { process(item); };",
"+for (let thing of things) { process(thing); };",
" for (let item of items) { process(item); };",
" for (let item of items) { process(item); };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "4c79ce75c12d7e2b77bd33d6f7e4f1d839ee88a8..cd97645bfe60051a1bbd7a490394b00b6df48a7d"
}
,{
"testCaseDescription": "javascript-for-of-statement-delete-replacement-test",
"expectedResult": {
"changes": {
"for-of-statement.js": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
46
]
}
},
"summary": "Deleted the 'thing of things' for statement"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
43
]
}
},
"summary": "Deleted the 'item of items' for statement"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
46
]
}
},
"summary": "Added the 'thing of things' for statement"
}
]
},
"errors": {}
},
"filePaths": [
"for-of-statement.js"
],
"patch": [
"diff --git a/for-of-statement.js b/for-of-statement.js",
"index ab20ded..62db34f 100644",
"--- a/for-of-statement.js",
"+++ b/for-of-statement.js",
"@@ -1,3 +1,2 @@",
"-for (let thing of things) { process(thing); };",
"-for (let item of items) { process(item); };",
" for (let item of items) { process(item); };",
"+for (let thing of things) { process(thing); };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "cd97645bfe60051a1bbd7a490394b00b6df48a7d..3fd962ae8d2bc510b50e7e85ef1ce4ad04375eb8"
}
,{
"testCaseDescription": "javascript-for-of-statement-delete-test",
"expectedResult": {
"changes": {
"for-of-statement.js": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
43
]
}
},
"summary": "Deleted the 'item of items' for statement"
}
]
},
"errors": {}
},
"filePaths": [
"for-of-statement.js"
],
"patch": [
"diff --git a/for-of-statement.js b/for-of-statement.js",
"index 62db34f..5170ce4 100644",
"--- a/for-of-statement.js",
"+++ b/for-of-statement.js",
"@@ -1,2 +1 @@",
"-for (let item of items) { process(item); };",
" for (let thing of things) { process(thing); };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "3fd962ae8d2bc510b50e7e85ef1ce4ad04375eb8..821a3c7b8a7b00f8a8ad7967aed163a12f042d10"
}
,{
"testCaseDescription": "javascript-for-of-statement-delete-rest-test",
"expectedResult": {
"changes": {
"for-of-statement.js": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
46
]
}
},
"summary": "Deleted the 'thing of things' for statement"
}
]
},
"errors": {}
},
"filePaths": [
"for-of-statement.js"
],
"patch": [
"diff --git a/for-of-statement.js b/for-of-statement.js",
"index 5170ce4..e69de29 100644",
"--- a/for-of-statement.js",
"+++ b/for-of-statement.js",
"@@ -1 +0,0 @@",
"-for (let thing of things) { process(thing); };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "821a3c7b8a7b00f8a8ad7967aed163a12f042d10..0b1a50d075cdb5202c523f929502c24a9fce63ce"
}]