mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
348 lines
11 KiB
JSON
348 lines
11 KiB
JSON
[{
|
|
"testCaseDescription": "javascript-function-call-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"function-call.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
27
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'someFunction(arg1, \"arg2\")' function call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"function-call.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/function-call.js b/function-call.js",
|
|
"index e69de29b..8bd95e09 100644",
|
|
"--- a/function-call.js",
|
|
"+++ b/function-call.js",
|
|
"@@ -0,0 +1 @@",
|
|
"+someFunction(arg1, \"arg2\");"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "c95bd0e01ff1d7d686262b782db20ad959d3676f..8d35c071d83baf7595dd69c6e63000d814343485"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-function-call-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"function-call.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
27
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'someFunction(arg1, \"arg3\")' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
27
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'someFunction(arg1, \"arg2\")' function call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"function-call.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/function-call.js b/function-call.js",
|
|
"index 8bd95e09..6bb4cf3f 100644",
|
|
"--- a/function-call.js",
|
|
"+++ b/function-call.js",
|
|
"@@ -1 +1,3 @@",
|
|
"+someFunction(arg1, \"arg3\");",
|
|
"+someFunction(arg1, \"arg2\");",
|
|
" someFunction(arg1, \"arg2\");"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "8d35c071d83baf7595dd69c6e63000d814343485..ced1926b498dacd2bb8365d9c9f7c07f75229170"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-function-call-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"function-call.js": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
20
|
|
],
|
|
"end": [
|
|
1,
|
|
26
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
20
|
|
],
|
|
"end": [
|
|
1,
|
|
26
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the \"arg3\" string with the \"arg2\" string in the someFunction(arg1, \"arg2\") function call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"function-call.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/function-call.js b/function-call.js",
|
|
"index 6bb4cf3f..b38c232b 100644",
|
|
"--- a/function-call.js",
|
|
"+++ b/function-call.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-someFunction(arg1, \"arg3\");",
|
|
"+someFunction(arg1, \"arg2\");",
|
|
" someFunction(arg1, \"arg2\");",
|
|
" someFunction(arg1, \"arg2\");"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "ced1926b498dacd2bb8365d9c9f7c07f75229170..1c76636d16ecfbdf2c061cbee3c6e9c8ead03189"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-function-call-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"function-call.js": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
20
|
|
],
|
|
"end": [
|
|
1,
|
|
26
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
20
|
|
],
|
|
"end": [
|
|
1,
|
|
26
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the \"arg2\" string with the \"arg3\" string in the someFunction(arg1, \"arg3\") function call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"function-call.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/function-call.js b/function-call.js",
|
|
"index b38c232b..6bb4cf3f 100644",
|
|
"--- a/function-call.js",
|
|
"+++ b/function-call.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-someFunction(arg1, \"arg2\");",
|
|
"+someFunction(arg1, \"arg3\");",
|
|
" someFunction(arg1, \"arg2\");",
|
|
" someFunction(arg1, \"arg2\");"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "1c76636d16ecfbdf2c061cbee3c6e9c8ead03189..d988eca7c678f25f5400db278a7092b4af201c36"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-function-call-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"function-call.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
27
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'someFunction(arg1, \"arg3\")' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
27
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'someFunction(arg1, \"arg2\")' function call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
27
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'someFunction(arg1, \"arg3\")' function call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"function-call.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/function-call.js b/function-call.js",
|
|
"index 6bb4cf3f..3e15c6ac 100644",
|
|
"--- a/function-call.js",
|
|
"+++ b/function-call.js",
|
|
"@@ -1,3 +1,2 @@",
|
|
"-someFunction(arg1, \"arg3\");",
|
|
"-someFunction(arg1, \"arg2\");",
|
|
" someFunction(arg1, \"arg2\");",
|
|
"+someFunction(arg1, \"arg3\");"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "d988eca7c678f25f5400db278a7092b4af201c36..46e628cebf19ab82cf52a1c276553dd4deb19448"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-function-call-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"function-call.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
27
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'someFunction(arg1, \"arg2\")' function call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"function-call.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/function-call.js b/function-call.js",
|
|
"index 3e15c6ac..1add64b5 100644",
|
|
"--- a/function-call.js",
|
|
"+++ b/function-call.js",
|
|
"@@ -1,2 +1 @@",
|
|
"-someFunction(arg1, \"arg2\");",
|
|
" someFunction(arg1, \"arg3\");"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "46e628cebf19ab82cf52a1c276553dd4deb19448..38cde3809ada68234c67c79128fa24657a566d83"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-function-call-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"function-call.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
27
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'someFunction(arg1, \"arg3\")' function call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"function-call.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/function-call.js b/function-call.js",
|
|
"index 1add64b5..e69de29b 100644",
|
|
"--- a/function-call.js",
|
|
"+++ b/function-call.js",
|
|
"@@ -1 +0,0 @@",
|
|
"-someFunction(arg1, \"arg3\");"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "38cde3809ada68234c67c79128fa24657a566d83..2d43584fc8ddc7ca7298a1e0e0a9be013b19f0be"
|
|
}]
|