mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
293 lines
9.1 KiB
JSON
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": "a6c03f4fe5985c8424ed595bd7d50ecc6098dc8a..11c2248a6d114e5db88e13af8def8eaa09a09d45"
|
|
}
|
|
,{
|
|
"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": "11c2248a6d114e5db88e13af8def8eaa09a09d45..7ed1007a324c95df70eefc8431845e8b8d52fc8a"
|
|
}
|
|
,{
|
|
"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": "7ed1007a324c95df70eefc8431845e8b8d52fc8a..1e73b9b08c68b5f920a4c7e0e7afe2a12241ad63"
|
|
}
|
|
,{
|
|
"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": "1e73b9b08c68b5f920a4c7e0e7afe2a12241ad63..ff56824c50998e8ccac9e604cd564e4384b817bc"
|
|
}
|
|
,{
|
|
"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": "ff56824c50998e8ccac9e604cd564e4384b817bc..5935d4c1093d472de0d76b9430758ae222d7f39f"
|
|
}
|
|
,{
|
|
"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": "5935d4c1093d472de0d76b9430758ae222d7f39f..f270d7e7af308e5cacc3d7334905fd5f2308dc19"
|
|
}]
|