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-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"function.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
31
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added an anonymous(arg1, arg2) function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"function.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/function.js b/function.js",
|
|
"index e69de29b..2d8d739d 100644",
|
|
"--- a/function.js",
|
|
"+++ b/function.js",
|
|
"@@ -0,0 +1 @@",
|
|
"+function(arg1, arg2) { arg2; };"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "790803fdb50f5b52531a5fd1dc0573fd2b036126..7922b25d0276bdf1431e206d3709b1fbf28c9133"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-function-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"function.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
31
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added an anonymous(arg1, arg2) function"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
31
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added an anonymous(arg1, arg2) function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"function.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/function.js b/function.js",
|
|
"index 2d8d739d..43894067 100644",
|
|
"--- a/function.js",
|
|
"+++ b/function.js",
|
|
"@@ -1 +1,3 @@",
|
|
"+function(arg1, arg2) { arg1; };",
|
|
"+function(arg1, arg2) { arg2; };",
|
|
" function(arg1, arg2) { arg2; };"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "7922b25d0276bdf1431e206d3709b1fbf28c9133..0078e81905fd24f5b8331a8afdb513e1cef9d37b"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-function-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"function.js": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
24
|
|
],
|
|
"end": [
|
|
1,
|
|
28
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
24
|
|
],
|
|
"end": [
|
|
1,
|
|
28
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'arg1' identifier with the 'arg2' identifier"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"function.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/function.js b/function.js",
|
|
"index 43894067..924c99e8 100644",
|
|
"--- a/function.js",
|
|
"+++ b/function.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-function(arg1, arg2) { arg1; };",
|
|
"+function(arg1, arg2) { arg2; };",
|
|
" function(arg1, arg2) { arg2; };",
|
|
" function(arg1, arg2) { arg2; };"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "0078e81905fd24f5b8331a8afdb513e1cef9d37b..46927e5733291be730cf9c3c08ba0310d5741b1a"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-function-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"function.js": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
24
|
|
],
|
|
"end": [
|
|
1,
|
|
28
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
24
|
|
],
|
|
"end": [
|
|
1,
|
|
28
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'arg2' identifier with the 'arg1' identifier"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"function.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/function.js b/function.js",
|
|
"index 924c99e8..43894067 100644",
|
|
"--- a/function.js",
|
|
"+++ b/function.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-function(arg1, arg2) { arg2; };",
|
|
"+function(arg1, arg2) { arg1; };",
|
|
" function(arg1, arg2) { arg2; };",
|
|
" function(arg1, arg2) { arg2; };"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "46927e5733291be730cf9c3c08ba0310d5741b1a..20a5479f9e8a063124d86ae85541ce7fdc62beef"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-function-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"function.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
31
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted an anonymous(arg1, arg2) function"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
31
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted an anonymous(arg1, arg2) function"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
31
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added an anonymous(arg1, arg2) function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"function.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/function.js b/function.js",
|
|
"index 43894067..254dbcf8 100644",
|
|
"--- a/function.js",
|
|
"+++ b/function.js",
|
|
"@@ -1,3 +1,2 @@",
|
|
"-function(arg1, arg2) { arg1; };",
|
|
"-function(arg1, arg2) { arg2; };",
|
|
" function(arg1, arg2) { arg2; };",
|
|
"+function(arg1, arg2) { arg1; };"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "20a5479f9e8a063124d86ae85541ce7fdc62beef..2834c6bfa834cd256af7b261c00c9ea9f4c89b29"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-function-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"function.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
31
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted an anonymous(arg1, arg2) function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"function.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/function.js b/function.js",
|
|
"index 254dbcf8..b37e8671 100644",
|
|
"--- a/function.js",
|
|
"+++ b/function.js",
|
|
"@@ -1,2 +1 @@",
|
|
"-function(arg1, arg2) { arg2; };",
|
|
" function(arg1, arg2) { arg1; };"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "2834c6bfa834cd256af7b261c00c9ea9f4c89b29..c2fbf6621ebe94f439fc6c087171487345109a21"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-function-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"function.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
31
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted an anonymous(arg1, arg2) function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"function.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/function.js b/function.js",
|
|
"index b37e8671..e69de29b 100644",
|
|
"--- a/function.js",
|
|
"+++ b/function.js",
|
|
"@@ -1 +0,0 @@",
|
|
"-function(arg1, arg2) { arg1; };"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "c2fbf6621ebe94f439fc6c087171487345109a21..42d2564cba025ea67f19ffdd328b554aa2aede8b"
|
|
}]
|