1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 07:25:44 +03:00
semantic/test/corpus/diff-summaries/javascript/for-in-statement.json

456 lines
15 KiB
JSON
Raw Normal View History

2016-10-11 18:12:20 +03:00
[{
"testCaseDescription": "javascript-for-in-statement-insert-test",
"expectedResult": {
"changes": {
"for-in-statement.js": [
{
"span": {
2016-10-11 18:54:47 +03:00
"insert": {
2016-10-11 18:12:20 +03:00
"start": [
1,
1
],
"end": [
1,
35
]
}
},
2016-10-11 23:17:34 +03:00
"summary": "Added the 'thing in things' for statement"
2016-10-11 18:12:20 +03:00
}
]
},
"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(); }"
],
2016-10-11 18:12:20 +03:00
"gitDir": "test/corpus/repos/javascript",
"shas": "75f87f22428c68545ebb3f876a1b09caf59d75c9..1d91306ffc69509679ae514ecc2a3403dc94aefb"
2016-10-11 18:12:20 +03:00
}
,{
"testCaseDescription": "javascript-for-in-statement-replacement-insert-test",
"expectedResult": {
"changes": {
"for-in-statement.js": [
{
"span": {
2016-10-11 18:54:47 +03:00
"insert": {
2016-10-11 18:12:20 +03:00
"start": [
1,
1
],
"end": [
1,
32
]
}
},
2016-10-11 23:17:34 +03:00
"summary": "Added the 'item in items' for statement"
2016-10-11 18:12:20 +03:00
},
{
"span": {
2016-10-11 18:54:47 +03:00
"insert": {
2016-10-11 18:12:20 +03:00
"start": [
2,
1
],
"end": [
2,
35
]
}
},
2016-10-11 23:17:34 +03:00
"summary": "Added the 'thing in things' for statement"
2016-10-11 18:12:20 +03:00
}
]
},
"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(); }"
],
2016-10-11 18:12:20 +03:00
"gitDir": "test/corpus/repos/javascript",
"shas": "1d91306ffc69509679ae514ecc2a3403dc94aefb..2f951d1d02db4475f786a87f7077648822ef26d3"
2016-10-11 18:12:20 +03:00
}
,{
"testCaseDescription": "javascript-for-in-statement-delete-insert-test",
"expectedResult": {
"changes": {
"for-in-statement.js": [
{
"span": {
2016-10-11 18:54:47 +03:00
"replace": [
2016-10-11 18:12:20 +03:00
{
"start": [
1,
6
],
"end": [
1,
10
]
},
{
"start": [
1,
6
],
"end": [
1,
11
]
}
]
},
2016-10-11 23:17:34 +03:00
"summary": "Replaced the 'item' identifier with the 'thing' identifier"
2016-10-11 18:12:20 +03:00
},
{
"span": {
2016-10-11 18:54:47 +03:00
"replace": [
2016-10-11 18:12:20 +03:00
{
"start": [
1,
14
],
"end": [
1,
19
]
},
{
"start": [
1,
15
],
"end": [
1,
21
]
}
]
},
2016-10-11 23:17:34 +03:00
"summary": "Replaced the 'items' identifier with the 'things' identifier"
2016-10-11 18:12:20 +03:00
},
{
"span": {
2016-10-11 18:54:47 +03:00
"replace": [
2016-10-11 18:12:20 +03:00
{
"start": [
1,
23
],
"end": [
1,
27
]
},
{
"start": [
1,
25
],
"end": [
1,
30
]
}
]
},
2016-10-11 23:17:34 +03:00
"summary": "Replaced the 'item' identifier with the 'thing' identifier in the thing() function call"
2016-10-11 18:12:20 +03:00
}
]
},
"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(); }"
],
2016-10-11 18:12:20 +03:00
"gitDir": "test/corpus/repos/javascript",
"shas": "2f951d1d02db4475f786a87f7077648822ef26d3..31f13f455d1c9d9efae42c7695abae57acf4684a"
2016-10-11 18:12:20 +03:00
}
,{
"testCaseDescription": "javascript-for-in-statement-replacement-test",
"expectedResult": {
"changes": {
"for-in-statement.js": [
{
"span": {
2016-10-11 18:54:47 +03:00
"replace": [
2016-10-11 18:12:20 +03:00
{
"start": [
1,
6
],
"end": [
1,
11
]
},
{
"start": [
1,
6
],
"end": [
1,
10
]
}
]
},
2016-10-11 23:17:34 +03:00
"summary": "Replaced the 'thing' identifier with the 'item' identifier"
2016-10-11 18:12:20 +03:00
},
{
"span": {
2016-10-11 18:54:47 +03:00
"replace": [
2016-10-11 18:12:20 +03:00
{
"start": [
1,
15
],
"end": [
1,
21
]
},
{
"start": [
1,
14
],
"end": [
1,
19
]
}
]
},
2016-10-11 23:17:34 +03:00
"summary": "Replaced the 'things' identifier with the 'items' identifier"
2016-10-11 18:12:20 +03:00
},
{
"span": {
2016-10-11 18:54:47 +03:00
"replace": [
2016-10-11 18:12:20 +03:00
{
"start": [
1,
25
],
"end": [
1,
30
]
},
{
"start": [
1,
23
],
"end": [
1,
27
]
}
]
},
2016-10-11 23:17:34 +03:00
"summary": "Replaced the 'thing' identifier with the 'item' identifier in the item() function call"
2016-10-11 18:12:20 +03:00
}
]
},
"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(); }"
],
2016-10-11 18:12:20 +03:00
"gitDir": "test/corpus/repos/javascript",
"shas": "31f13f455d1c9d9efae42c7695abae57acf4684a..20bf2c4356e71329f5e131bec7be78669308acc8"
2016-10-11 18:12:20 +03:00
}
,{
"testCaseDescription": "javascript-for-in-statement-delete-replacement-test",
"expectedResult": {
"changes": {
"for-in-statement.js": [
{
"span": {
2016-10-11 18:54:47 +03:00
"delete": {
2016-10-11 18:12:20 +03:00
"start": [
1,
1
],
"end": [
1,
32
]
}
},
2016-10-11 23:17:34 +03:00
"summary": "Deleted the 'item in items' for statement"
2016-10-11 18:12:20 +03:00
},
{
"span": {
2016-10-11 18:54:47 +03:00
"delete": {
2016-10-11 18:12:20 +03:00
"start": [
2,
1
],
"end": [
2,
35
]
}
},
2016-10-11 23:17:34 +03:00
"summary": "Deleted the 'thing in things' for statement"
2016-10-11 18:12:20 +03:00
},
{
"span": {
2016-10-11 18:54:47 +03:00
"insert": {
2016-10-11 18:12:20 +03:00
"start": [
2,
1
],
"end": [
2,
32
]
}
},
2016-10-11 23:17:34 +03:00
"summary": "Added the 'item in items' for statement"
2016-10-11 18:12:20 +03:00
}
]
},
"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(); }"
],
2016-10-11 18:12:20 +03:00
"gitDir": "test/corpus/repos/javascript",
"shas": "20bf2c4356e71329f5e131bec7be78669308acc8..cc6e8abe393b4d3c5e2b919a60c832b78ad0a4cd"
2016-10-11 18:12:20 +03:00
}
,{
"testCaseDescription": "javascript-for-in-statement-delete-test",
"expectedResult": {
"changes": {
"for-in-statement.js": [
{
"span": {
2016-10-11 18:54:47 +03:00
"delete": {
2016-10-11 18:12:20 +03:00
"start": [
1,
1
],
"end": [
1,
35
]
}
},
2016-10-11 23:17:34 +03:00
"summary": "Deleted the 'thing in things' for statement"
2016-10-11 18:12:20 +03:00
}
]
},
"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(); }"
],
2016-10-11 18:12:20 +03:00
"gitDir": "test/corpus/repos/javascript",
"shas": "cc6e8abe393b4d3c5e2b919a60c832b78ad0a4cd..71a7b11ea45ba6cae99bbc5d1bdad0c7eb526a3b"
2016-10-11 18:12:20 +03:00
}
,{
"testCaseDescription": "javascript-for-in-statement-delete-rest-test",
"expectedResult": {
"changes": {
"for-in-statement.js": [
{
"span": {
2016-10-11 18:54:47 +03:00
"delete": {
2016-10-11 18:12:20 +03:00
"start": [
1,
1
],
"end": [
1,
32
]
}
},
2016-10-11 23:17:34 +03:00
"summary": "Deleted the 'item in items' for statement"
2016-10-11 18:12:20 +03:00
}
]
},
"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(); }"
],
2016-10-11 18:12:20 +03:00
"gitDir": "test/corpus/repos/javascript",
"shas": "71a7b11ea45ba6cae99bbc5d1bdad0c7eb526a3b..d1b2bee18a7da4fefa2a4786b2f692fc5795f48c"
2016-10-11 18:12:20 +03:00
}]