mirror of
https://github.com/github/semantic.git
synced 2024-12-25 07:55:12 +03:00
483e8a3f00
JavaScript: method call → function call. Go: regenerated everything.
257 lines
7.7 KiB
JSON
257 lines
7.7 KiB
JSON
[{
|
|
"testCaseDescription": "javascript-yield-setup-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"yield.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
35
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'foo' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"yield.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/yield.js b/yield.js",
|
|
"index e69de29b..e01b17c7 100644",
|
|
"--- a/yield.js",
|
|
"+++ b/yield.js",
|
|
"@@ -0,0 +1 @@",
|
|
"+function* foo(){ var index = 0; }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "5e76eb9bd80785120da1d03a39846954694b0a87..f57697ec59783c8e1203e436eae89fbebef52f08"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-yield-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"yield.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
33
|
|
],
|
|
"end": [
|
|
1,
|
|
41
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'i' yield statement in the foo function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"yield.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/yield.js b/yield.js",
|
|
"index e01b17c7..e2088166 100644",
|
|
"--- a/yield.js",
|
|
"+++ b/yield.js",
|
|
"@@ -1 +1 @@",
|
|
"-function* foo(){ var index = 0; }",
|
|
"+function* foo(){ var index = 0; yield i; }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "f57697ec59783c8e1203e436eae89fbebef52f08..56f91ef1d43bb39bcdf93188575968e3b886b851"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-yield-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"yield.js": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
33
|
|
],
|
|
"end": [
|
|
1,
|
|
41
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
33
|
|
],
|
|
"end": [
|
|
1,
|
|
43
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'i' yield statement with the 'i++' yield statement in the foo function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"yield.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/yield.js b/yield.js",
|
|
"index e2088166..78ab2efe 100644",
|
|
"--- a/yield.js",
|
|
"+++ b/yield.js",
|
|
"@@ -1 +1 @@",
|
|
"-function* foo(){ var index = 0; yield i; }",
|
|
"+function* foo(){ var index = 0; yield i++; }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "56f91ef1d43bb39bcdf93188575968e3b886b851..f949be3ba0a2939702be6eda4eb8810b35b3240a"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-yield-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"yield.js": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
33
|
|
],
|
|
"end": [
|
|
1,
|
|
43
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
33
|
|
],
|
|
"end": [
|
|
1,
|
|
41
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'i++' yield statement with the 'i' yield statement in the foo function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"yield.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/yield.js b/yield.js",
|
|
"index 78ab2efe..e2088166 100644",
|
|
"--- a/yield.js",
|
|
"+++ b/yield.js",
|
|
"@@ -1 +1 @@",
|
|
"-function* foo(){ var index = 0; yield i++; }",
|
|
"+function* foo(){ var index = 0; yield i; }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "f949be3ba0a2939702be6eda4eb8810b35b3240a..0893b0411a64cf78f313d02dd09aaf0d21287d61"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-yield-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"yield.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
33
|
|
],
|
|
"end": [
|
|
1,
|
|
41
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'i' yield statement in the foo function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"yield.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/yield.js b/yield.js",
|
|
"index e2088166..e01b17c7 100644",
|
|
"--- a/yield.js",
|
|
"+++ b/yield.js",
|
|
"@@ -1 +1 @@",
|
|
"-function* foo(){ var index = 0; yield i; }",
|
|
"+function* foo(){ var index = 0; }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "0893b0411a64cf78f313d02dd09aaf0d21287d61..de14a8652b0a678eb5f0bcbe9936d5fe4aa4d31f"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-yield-teardown-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"yield.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
35
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'foo' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"yield.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/yield.js b/yield.js",
|
|
"index e01b17c7..e69de29b 100644",
|
|
"--- a/yield.js",
|
|
"+++ b/yield.js",
|
|
"@@ -1 +0,0 @@",
|
|
"-function* foo(){ var index = 0; }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "de14a8652b0a678eb5f0bcbe9936d5fe4aa4d31f..abce7caf7e67e197076f10ee997f4a8e08480f93"
|
|
}]
|