1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 23:11:50 +03:00
semantic/test/corpus/diff-summaries/javascript/function.json
2016-11-03 16:02:56 -07:00

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 e69de29..2d8d739 100644",
"--- a/function.js",
"+++ b/function.js",
"@@ -0,0 +1 @@",
"+function(arg1, arg2) { arg2; };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "0bdf412036a9a6aea51108a20404c37541fffcfb..c76e13ba716fc18e9924e1f4675845f61823c9c7"
}
,{
"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 2d8d739..4389406 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": "c76e13ba716fc18e9924e1f4675845f61823c9c7..7c1485f22ad0c4bc98a22cdb8d341d2eb97fcab8"
}
,{
"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 4389406..924c99e 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": "7c1485f22ad0c4bc98a22cdb8d341d2eb97fcab8..9e13719e7c1614958c3528e609d7ac1cfb068fe6"
}
,{
"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 924c99e..4389406 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": "9e13719e7c1614958c3528e609d7ac1cfb068fe6..e36301a0b4cc27e38d4c77c49f97e1a6ba816fbb"
}
,{
"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 4389406..254dbcf 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": "e36301a0b4cc27e38d4c77c49f97e1a6ba816fbb..fbc7371a528f691d2e0b43ceed413fab19186b82"
}
,{
"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 254dbcf..b37e867 100644",
"--- a/function.js",
"+++ b/function.js",
"@@ -1,2 +1 @@",
"-function(arg1, arg2) { arg2; };",
" function(arg1, arg2) { arg1; };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "fbc7371a528f691d2e0b43ceed413fab19186b82..dd37f0a24f8a677191eb11c1dad4119d46e35d14"
}
,{
"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 b37e867..e69de29 100644",
"--- a/function.js",
"+++ b/function.js",
"@@ -1 +0,0 @@",
"-function(arg1, arg2) { arg1; };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "dd37f0a24f8a677191eb11c1dad4119d46e35d14..d700dc51fee7a3dd557906dcdf46d426285d7955"
}]