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/continue.json
2016-12-05 13:02:46 -08:00

293 lines
9.1 KiB
JSON

[{
"testCaseDescription": "javascript-continue-setup-test",
"expectedResult": {
"changes": {
"continue.js": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
50
]
}
},
"summary": "Added the 'i = 0; i < 10; i++' for statement"
}
]
},
"errors": {}
},
"filePaths": [
"continue.js"
],
"patch": [
"diff --git a/continue.js b/continue.js",
"index e69de29b..3f583e3d 100644",
"--- a/continue.js",
"+++ b/continue.js",
"@@ -0,0 +1 @@",
"+for (i = 0; i < 10; i++) { if (i === 4) { }; i }"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "7b31459c5a9378f4fe26f4e3e6d5c1fd3b6aee23..6f1f37c267e2d029c289f0fbcf27091ba3d1dec0"
}
,{
"testCaseDescription": "javascript-continue-insert-test",
"expectedResult": {
"changes": {
"continue.js": [
{
"span": {
"insert": {
"start": [
1,
43
],
"end": [
1,
52
]
}
},
"summary": "Added a continue statement in the 'i === 4' if statement"
},
{
"span": {
"delete": {
"start": [
1,
41
],
"end": [
1,
45
]
}
},
"summary": "Deleted the '{ }' object in the 'i === 4' if statement"
}
]
},
"errors": {}
},
"filePaths": [
"continue.js"
],
"patch": [
"diff --git a/continue.js b/continue.js",
"index 3f583e3d..16ebcc57 100644",
"--- a/continue.js",
"+++ b/continue.js",
"@@ -1 +1 @@",
"-for (i = 0; i < 10; i++) { if (i === 4) { }; i }",
"+for (i = 0; i < 10; i++) { if (i === 4) { continue; }; i }"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "6f1f37c267e2d029c289f0fbcf27091ba3d1dec0..b23c299b2611ac212c2f335a44e9ffcfbe821ed4"
}
,{
"testCaseDescription": "javascript-continue-replacement-test",
"expectedResult": {
"changes": {
"continue.js": [
{
"span": {
"insert": {
"start": [
1,
43
],
"end": [
1,
49
]
}
},
"summary": "Added a break statement in the 'i === 4' if statement"
},
{
"span": {
"delete": {
"start": [
1,
43
],
"end": [
1,
52
]
}
},
"summary": "Deleted a continue statement in the 'i === 4' if statement"
}
]
},
"errors": {}
},
"filePaths": [
"continue.js"
],
"patch": [
"diff --git a/continue.js b/continue.js",
"index 16ebcc57..629dfa91 100644",
"--- a/continue.js",
"+++ b/continue.js",
"@@ -1 +1 @@",
"-for (i = 0; i < 10; i++) { if (i === 4) { continue; }; i }",
"+for (i = 0; i < 10; i++) { if (i === 4) { break; }; i }"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "b23c299b2611ac212c2f335a44e9ffcfbe821ed4..59f5084383702801c670c2d9738a4d78c93a0b0a"
}
,{
"testCaseDescription": "javascript-continue-delete-replacement-test",
"expectedResult": {
"changes": {
"continue.js": [
{
"span": {
"insert": {
"start": [
1,
43
],
"end": [
1,
52
]
}
},
"summary": "Added a continue statement in the 'i === 4' if statement"
},
{
"span": {
"delete": {
"start": [
1,
43
],
"end": [
1,
49
]
}
},
"summary": "Deleted a break statement in the 'i === 4' if statement"
}
]
},
"errors": {}
},
"filePaths": [
"continue.js"
],
"patch": [
"diff --git a/continue.js b/continue.js",
"index 629dfa91..16ebcc57 100644",
"--- a/continue.js",
"+++ b/continue.js",
"@@ -1 +1 @@",
"-for (i = 0; i < 10; i++) { if (i === 4) { break; }; i }",
"+for (i = 0; i < 10; i++) { if (i === 4) { continue; }; i }"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "59f5084383702801c670c2d9738a4d78c93a0b0a..ac045f406aaa05c9c85d6a20e527e2e62e99ce2c"
}
,{
"testCaseDescription": "javascript-continue-delete-insert-test",
"expectedResult": {
"changes": {
"continue.js": [
{
"span": {
"insert": {
"start": [
1,
41
],
"end": [
1,
45
]
}
},
"summary": "Added the '{ }' object in the 'i === 4' if statement"
},
{
"span": {
"delete": {
"start": [
1,
43
],
"end": [
1,
52
]
}
},
"summary": "Deleted a continue statement in the 'i === 4' if statement"
}
]
},
"errors": {}
},
"filePaths": [
"continue.js"
],
"patch": [
"diff --git a/continue.js b/continue.js",
"index 16ebcc57..3f583e3d 100644",
"--- a/continue.js",
"+++ b/continue.js",
"@@ -1 +1 @@",
"-for (i = 0; i < 10; i++) { if (i === 4) { continue; }; i }",
"+for (i = 0; i < 10; i++) { if (i === 4) { }; i }"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "ac045f406aaa05c9c85d6a20e527e2e62e99ce2c..0c96f2e07ccf5ac404d4301a1a1e5ca9aa19b0b3"
}
,{
"testCaseDescription": "javascript-continue-teardown-test",
"expectedResult": {
"changes": {
"continue.js": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
50
]
}
},
"summary": "Deleted the 'i = 0; i < 10; i++' for statement"
}
]
},
"errors": {}
},
"filePaths": [
"continue.js"
],
"patch": [
"diff --git a/continue.js b/continue.js",
"index 3f583e3d..e69de29b 100644",
"--- a/continue.js",
"+++ b/continue.js",
"@@ -1 +0,0 @@",
"-for (i = 0; i < 10; i++) { if (i === 4) { }; i }"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "0c96f2e07ccf5ac404d4301a1a1e5ca9aa19b0b3..b4a1b602905b005b1bfe48d8f78faebd8c9cf016"
}]