mirror of
https://github.com/github/semantic.git
synced 2024-12-23 23:11:50 +03:00
402 lines
14 KiB
JSON
402 lines
14 KiB
JSON
[{
|
|
"testCaseDescription": "javascript-nested-do-while-in-function-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"nested-do-while-in-function.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
65
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'f' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"nested-do-while-in-function.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/nested-do-while-in-function.js b/nested-do-while-in-function.js",
|
|
"index e69de29..d205614 100644",
|
|
"--- a/nested-do-while-in-function.js",
|
|
"+++ b/nested-do-while-in-function.js",
|
|
"@@ -0,0 +1 @@",
|
|
"+function f(arg1, arg2) { do { something(arg1); } while (arg2); }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "b916dd0d4e57f46f672acd9dc9130eef9e0bcc60..b60cbbceaf5939517572a1c7ebc7fd80db858b96"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-nested-do-while-in-function-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"nested-do-while-in-function.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
65
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'f' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
65
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'f' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"nested-do-while-in-function.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/nested-do-while-in-function.js b/nested-do-while-in-function.js",
|
|
"index d205614..5dfcca6 100644",
|
|
"--- a/nested-do-while-in-function.js",
|
|
"+++ b/nested-do-while-in-function.js",
|
|
"@@ -1 +1,3 @@",
|
|
"+function f(arg1, arg2) { do { something(arg2); } while (arg1); }",
|
|
"+function f(arg1, arg2) { do { something(arg1); } while (arg2); }",
|
|
" function f(arg1, arg2) { do { something(arg1); } while (arg2); }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "b60cbbceaf5939517572a1c7ebc7fd80db858b96..3da97953dcda4f775d102a777c46bf8476ac6ee6"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-nested-do-while-in-function-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"nested-do-while-in-function.js": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
41
|
|
],
|
|
"end": [
|
|
1,
|
|
45
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
41
|
|
],
|
|
"end": [
|
|
1,
|
|
45
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'arg2' identifier with the 'arg1' identifier in the something(arg1) function call of the 'f' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
57
|
|
],
|
|
"end": [
|
|
1,
|
|
61
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
57
|
|
],
|
|
"end": [
|
|
1,
|
|
61
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'arg1' identifier with the 'arg2' identifier in the arg2 do/while statement of the 'f' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"nested-do-while-in-function.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/nested-do-while-in-function.js b/nested-do-while-in-function.js",
|
|
"index 5dfcca6..49cff7e 100644",
|
|
"--- a/nested-do-while-in-function.js",
|
|
"+++ b/nested-do-while-in-function.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-function f(arg1, arg2) { do { something(arg2); } while (arg1); }",
|
|
"+function f(arg1, arg2) { do { something(arg1); } while (arg2); }",
|
|
" function f(arg1, arg2) { do { something(arg1); } while (arg2); }",
|
|
" function f(arg1, arg2) { do { something(arg1); } while (arg2); }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "3da97953dcda4f775d102a777c46bf8476ac6ee6..d91742e7e9daa195667f006f6eb20e19c6f16c00"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-nested-do-while-in-function-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"nested-do-while-in-function.js": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
41
|
|
],
|
|
"end": [
|
|
1,
|
|
45
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
41
|
|
],
|
|
"end": [
|
|
1,
|
|
45
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'arg1' identifier with the 'arg2' identifier in the something(arg2) function call of the 'f' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
57
|
|
],
|
|
"end": [
|
|
1,
|
|
61
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
57
|
|
],
|
|
"end": [
|
|
1,
|
|
61
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'arg2' identifier with the 'arg1' identifier in the arg1 do/while statement of the 'f' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"nested-do-while-in-function.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/nested-do-while-in-function.js b/nested-do-while-in-function.js",
|
|
"index 49cff7e..5dfcca6 100644",
|
|
"--- a/nested-do-while-in-function.js",
|
|
"+++ b/nested-do-while-in-function.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-function f(arg1, arg2) { do { something(arg1); } while (arg2); }",
|
|
"+function f(arg1, arg2) { do { something(arg2); } while (arg1); }",
|
|
" function f(arg1, arg2) { do { something(arg1); } while (arg2); }",
|
|
" function f(arg1, arg2) { do { something(arg1); } while (arg2); }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "d91742e7e9daa195667f006f6eb20e19c6f16c00..f4842813b2ac2a5996ad23bbeeb6d022a3c29f8e"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-nested-do-while-in-function-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"nested-do-while-in-function.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
65
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'f' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
65
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'f' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
65
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'f' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"nested-do-while-in-function.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/nested-do-while-in-function.js b/nested-do-while-in-function.js",
|
|
"index 5dfcca6..babb1e6 100644",
|
|
"--- a/nested-do-while-in-function.js",
|
|
"+++ b/nested-do-while-in-function.js",
|
|
"@@ -1,3 +1,2 @@",
|
|
"-function f(arg1, arg2) { do { something(arg2); } while (arg1); }",
|
|
"-function f(arg1, arg2) { do { something(arg1); } while (arg2); }",
|
|
" function f(arg1, arg2) { do { something(arg1); } while (arg2); }",
|
|
"+function f(arg1, arg2) { do { something(arg2); } while (arg1); }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "f4842813b2ac2a5996ad23bbeeb6d022a3c29f8e..39c63fc4aa834c62a569d089f3c660ff87519271"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-nested-do-while-in-function-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"nested-do-while-in-function.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
65
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'f' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"nested-do-while-in-function.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/nested-do-while-in-function.js b/nested-do-while-in-function.js",
|
|
"index babb1e6..2b15580 100644",
|
|
"--- a/nested-do-while-in-function.js",
|
|
"+++ b/nested-do-while-in-function.js",
|
|
"@@ -1,2 +1 @@",
|
|
"-function f(arg1, arg2) { do { something(arg1); } while (arg2); }",
|
|
" function f(arg1, arg2) { do { something(arg2); } while (arg1); }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "39c63fc4aa834c62a569d089f3c660ff87519271..6cdad31d7f48683bfe6ff831cd286c79d2467e8f"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-nested-do-while-in-function-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"nested-do-while-in-function.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
65
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'f' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"nested-do-while-in-function.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/nested-do-while-in-function.js b/nested-do-while-in-function.js",
|
|
"index 2b15580..e69de29 100644",
|
|
"--- a/nested-do-while-in-function.js",
|
|
"+++ b/nested-do-while-in-function.js",
|
|
"@@ -1 +0,0 @@",
|
|
"-function f(arg1, arg2) { do { something(arg2); } while (arg1); }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "6cdad31d7f48683bfe6ff831cd286c79d2467e8f..94d7e0ef831c81697b130d8e7c032b876c270e33"
|
|
}]
|