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-method-call-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"method-call.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
32
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'object.someMethod(arg1, \"arg2\")' method call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"method-call.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/method-call.js b/method-call.js",
|
|
"index e69de29..07ab90c 100644",
|
|
"--- a/method-call.js",
|
|
"+++ b/method-call.js",
|
|
"@@ -0,0 +1 @@",
|
|
"+object.someMethod(arg1, \"arg2\");"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "f8662860eb083b9e95b5cc1c706a7872a4779532..616ca3e3b4a298f69107bd17d20b8fe2e5fd3d80"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-method-call-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"method-call.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
32
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'object.someMethod(arg1, \"arg3\")' method call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
32
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'object.someMethod(arg1, \"arg2\")' method call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"method-call.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/method-call.js b/method-call.js",
|
|
"index 07ab90c..9341e17 100644",
|
|
"--- a/method-call.js",
|
|
"+++ b/method-call.js",
|
|
"@@ -1 +1,3 @@",
|
|
"+object.someMethod(arg1, \"arg3\");",
|
|
"+object.someMethod(arg1, \"arg2\");",
|
|
" object.someMethod(arg1, \"arg2\");"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "616ca3e3b4a298f69107bd17d20b8fe2e5fd3d80..1ddf2d53694021927a1783fc78ab68dca0508ce9"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-method-call-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"method-call.js": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
25
|
|
],
|
|
"end": [
|
|
1,
|
|
31
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
25
|
|
],
|
|
"end": [
|
|
1,
|
|
31
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the \"arg3\" string with the \"arg2\" string in the object.someMethod(arg1, \"arg2\") method call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"method-call.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/method-call.js b/method-call.js",
|
|
"index 9341e17..f6ada2d 100644",
|
|
"--- a/method-call.js",
|
|
"+++ b/method-call.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-object.someMethod(arg1, \"arg3\");",
|
|
"+object.someMethod(arg1, \"arg2\");",
|
|
" object.someMethod(arg1, \"arg2\");",
|
|
" object.someMethod(arg1, \"arg2\");"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "1ddf2d53694021927a1783fc78ab68dca0508ce9..741134e42738870aeb25a8395d4a656ddd86bf4b"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-method-call-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"method-call.js": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
25
|
|
],
|
|
"end": [
|
|
1,
|
|
31
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
25
|
|
],
|
|
"end": [
|
|
1,
|
|
31
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the \"arg2\" string with the \"arg3\" string in the object.someMethod(arg1, \"arg3\") method call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"method-call.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/method-call.js b/method-call.js",
|
|
"index f6ada2d..9341e17 100644",
|
|
"--- a/method-call.js",
|
|
"+++ b/method-call.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-object.someMethod(arg1, \"arg2\");",
|
|
"+object.someMethod(arg1, \"arg3\");",
|
|
" object.someMethod(arg1, \"arg2\");",
|
|
" object.someMethod(arg1, \"arg2\");"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "741134e42738870aeb25a8395d4a656ddd86bf4b..4778b03d41ac4397158cf93d091d520be85bfc34"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-method-call-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"method-call.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
32
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'object.someMethod(arg1, \"arg3\")' method call"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
32
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'object.someMethod(arg1, \"arg2\")' method call"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
32
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'object.someMethod(arg1, \"arg3\")' method call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"method-call.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/method-call.js b/method-call.js",
|
|
"index 9341e17..894dcf6 100644",
|
|
"--- a/method-call.js",
|
|
"+++ b/method-call.js",
|
|
"@@ -1,3 +1,2 @@",
|
|
"-object.someMethod(arg1, \"arg3\");",
|
|
"-object.someMethod(arg1, \"arg2\");",
|
|
" object.someMethod(arg1, \"arg2\");",
|
|
"+object.someMethod(arg1, \"arg3\");"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "4778b03d41ac4397158cf93d091d520be85bfc34..b2b8e482425d3459e6e1cab14dd7c6201bfa516e"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-method-call-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"method-call.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
32
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'object.someMethod(arg1, \"arg2\")' method call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"method-call.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/method-call.js b/method-call.js",
|
|
"index 894dcf6..a82528c 100644",
|
|
"--- a/method-call.js",
|
|
"+++ b/method-call.js",
|
|
"@@ -1,2 +1 @@",
|
|
"-object.someMethod(arg1, \"arg2\");",
|
|
" object.someMethod(arg1, \"arg3\");"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "b2b8e482425d3459e6e1cab14dd7c6201bfa516e..54e0a5e18b235909c85caf03159b380559d9c68d"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-method-call-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"method-call.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
32
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'object.someMethod(arg1, \"arg3\")' method call"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"method-call.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/method-call.js b/method-call.js",
|
|
"index a82528c..e69de29 100644",
|
|
"--- a/method-call.js",
|
|
"+++ b/method-call.js",
|
|
"@@ -1 +0,0 @@",
|
|
"-object.someMethod(arg1, \"arg3\");"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "54e0a5e18b235909c85caf03159b380559d9c68d..5d5d40b2fa515dfcb7494d9b83f22687c56de0f5"
|
|
}]
|