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.
402 lines
14 KiB
JSON
402 lines
14 KiB
JSON
[{
|
|
"testCaseDescription": "javascript-nested-functions-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"nested-functions.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
103
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'parent' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"nested-functions.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/nested-functions.js b/nested-functions.js",
|
|
"index e69de29b..72531d81 100644",
|
|
"--- a/nested-functions.js",
|
|
"+++ b/nested-functions.js",
|
|
"@@ -0,0 +1 @@",
|
|
"+function parent (arg1, arg2) { function child (arg3, arg4) { console.log(arg3); console.log(arg4); } }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "03a1b4a15f149e9715aa37bf2334cb4f05f0e8ff..4ce42b8934b35777d212723ca9a88cbee7535b48"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-nested-functions-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"nested-functions.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
103
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'parent' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
103
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'parent' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"nested-functions.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/nested-functions.js b/nested-functions.js",
|
|
"index 72531d81..c960aae1 100644",
|
|
"--- a/nested-functions.js",
|
|
"+++ b/nested-functions.js",
|
|
"@@ -1 +1,3 @@",
|
|
"+function parent (arg1, arg2) { function child (arg3, arg4) { console.log(arg1); console.log(arg2); } }",
|
|
"+function parent (arg1, arg2) { function child (arg3, arg4) { console.log(arg3); console.log(arg4); } }",
|
|
" function parent (arg1, arg2) { function child (arg3, arg4) { console.log(arg3); console.log(arg4); } }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "4ce42b8934b35777d212723ca9a88cbee7535b48..d4b753c9830ac2dd22f16d0ec57c93b3214d7d57"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-nested-functions-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"nested-functions.js": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
74
|
|
],
|
|
"end": [
|
|
1,
|
|
78
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
74
|
|
],
|
|
"end": [
|
|
1,
|
|
78
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'arg1' identifier with the 'arg3' identifier in the console.log(arg3) function call of the 'child' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
93
|
|
],
|
|
"end": [
|
|
1,
|
|
97
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
93
|
|
],
|
|
"end": [
|
|
1,
|
|
97
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'arg2' identifier with the 'arg4' identifier in the console.log(arg4) function call of the 'child' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"nested-functions.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/nested-functions.js b/nested-functions.js",
|
|
"index c960aae1..1b9b61a3 100644",
|
|
"--- a/nested-functions.js",
|
|
"+++ b/nested-functions.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-function parent (arg1, arg2) { function child (arg3, arg4) { console.log(arg1); console.log(arg2); } }",
|
|
"+function parent (arg1, arg2) { function child (arg3, arg4) { console.log(arg3); console.log(arg4); } }",
|
|
" function parent (arg1, arg2) { function child (arg3, arg4) { console.log(arg3); console.log(arg4); } }",
|
|
" function parent (arg1, arg2) { function child (arg3, arg4) { console.log(arg3); console.log(arg4); } }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "d4b753c9830ac2dd22f16d0ec57c93b3214d7d57..27d1213c9b03406885e69e99e21581bdc0d57a90"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-nested-functions-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"nested-functions.js": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
74
|
|
],
|
|
"end": [
|
|
1,
|
|
78
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
74
|
|
],
|
|
"end": [
|
|
1,
|
|
78
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'arg3' identifier with the 'arg1' identifier in the console.log(arg1) function call of the 'child' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
93
|
|
],
|
|
"end": [
|
|
1,
|
|
97
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
93
|
|
],
|
|
"end": [
|
|
1,
|
|
97
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'arg4' identifier with the 'arg2' identifier in the console.log(arg2) function call of the 'child' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"nested-functions.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/nested-functions.js b/nested-functions.js",
|
|
"index 1b9b61a3..c960aae1 100644",
|
|
"--- a/nested-functions.js",
|
|
"+++ b/nested-functions.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-function parent (arg1, arg2) { function child (arg3, arg4) { console.log(arg3); console.log(arg4); } }",
|
|
"+function parent (arg1, arg2) { function child (arg3, arg4) { console.log(arg1); console.log(arg2); } }",
|
|
" function parent (arg1, arg2) { function child (arg3, arg4) { console.log(arg3); console.log(arg4); } }",
|
|
" function parent (arg1, arg2) { function child (arg3, arg4) { console.log(arg3); console.log(arg4); } }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "27d1213c9b03406885e69e99e21581bdc0d57a90..b4cc03a33f7f1b03461ad9089715eba1f44ede40"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-nested-functions-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"nested-functions.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
103
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'parent' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
103
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'parent' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
103
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'parent' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"nested-functions.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/nested-functions.js b/nested-functions.js",
|
|
"index c960aae1..81522c7d 100644",
|
|
"--- a/nested-functions.js",
|
|
"+++ b/nested-functions.js",
|
|
"@@ -1,3 +1,2 @@",
|
|
"-function parent (arg1, arg2) { function child (arg3, arg4) { console.log(arg1); console.log(arg2); } }",
|
|
"-function parent (arg1, arg2) { function child (arg3, arg4) { console.log(arg3); console.log(arg4); } }",
|
|
" function parent (arg1, arg2) { function child (arg3, arg4) { console.log(arg3); console.log(arg4); } }",
|
|
"+function parent (arg1, arg2) { function child (arg3, arg4) { console.log(arg1); console.log(arg2); } }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "b4cc03a33f7f1b03461ad9089715eba1f44ede40..dc0c846188cd94a7a6c54e6ffeb8a2df5954cf20"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-nested-functions-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"nested-functions.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
103
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'parent' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"nested-functions.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/nested-functions.js b/nested-functions.js",
|
|
"index 81522c7d..30564800 100644",
|
|
"--- a/nested-functions.js",
|
|
"+++ b/nested-functions.js",
|
|
"@@ -1,2 +1 @@",
|
|
"-function parent (arg1, arg2) { function child (arg3, arg4) { console.log(arg3); console.log(arg4); } }",
|
|
" function parent (arg1, arg2) { function child (arg3, arg4) { console.log(arg1); console.log(arg2); } }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "dc0c846188cd94a7a6c54e6ffeb8a2df5954cf20..7d1d6d109a4c86188cdfb9df514d7f3bf1009ae8"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-nested-functions-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"nested-functions.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
103
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'parent' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"nested-functions.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/nested-functions.js b/nested-functions.js",
|
|
"index 30564800..e69de29b 100644",
|
|
"--- a/nested-functions.js",
|
|
"+++ b/nested-functions.js",
|
|
"@@ -1 +0,0 @@",
|
|
"-function parent (arg1, arg2) { function child (arg3, arg4) { console.log(arg1); console.log(arg2); } }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "7d1d6d109a4c86188cdfb9df514d7f3bf1009ae8..d15a8f422c2a2393c71f113fdb716151dc5a3840"
|
|
}]
|