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

618 lines
22 KiB
JSON

[{
"testCaseDescription": "javascript-function-call-args-insert-test",
"expectedResult": {
"changes": {
"function-call-args.js": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
77
]
}
},
"summary": "Added the 'someFunction(1, \"string\", …, true)' function call"
}
]
},
"errors": {}
},
"filePaths": [
"function-call-args.js"
],
"patch": [
"diff --git a/function-call-args.js b/function-call-args.js",
"index e69de29..699333d 100644",
"--- a/function-call-args.js",
"+++ b/function-call-args.js",
"@@ -0,0 +1 @@",
"+someFunction(1, \"string\", function(a,b) { console.log(a); return b; }, true)"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "5d5d40b2fa515dfcb7494d9b83f22687c56de0f5..d2a8bcf4eb5c5193cb358f09a81b0239be2a84ad"
}
,{
"testCaseDescription": "javascript-function-call-args-replacement-insert-test",
"expectedResult": {
"changes": {
"function-call-args.js": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
83
]
}
},
"summary": "Added the 'someFunction(1, \"otherString\", …, false)' function call"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
77
]
}
},
"summary": "Added the 'someFunction(1, \"string\", …, true)' function call"
}
]
},
"errors": {}
},
"filePaths": [
"function-call-args.js"
],
"patch": [
"diff --git a/function-call-args.js b/function-call-args.js",
"index 699333d..3f4ee6e 100644",
"--- a/function-call-args.js",
"+++ b/function-call-args.js",
"@@ -1 +1,3 @@",
"+someFunction(1, \"otherString\", function(b,c) { console.log(b); return c; }, false)",
"+someFunction(1, \"string\", function(a,b) { console.log(a); return b; }, true)",
" someFunction(1, \"string\", function(a,b) { console.log(a); return b; }, true)"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "d2a8bcf4eb5c5193cb358f09a81b0239be2a84ad..539cee544c8600977bd76181a692ef4e27c4b759"
}
,{
"testCaseDescription": "javascript-function-call-args-delete-insert-test",
"expectedResult": {
"changes": {
"function-call-args.js": [
{
"span": {
"replace": [
{
"start": [
1,
17
],
"end": [
1,
30
]
},
{
"start": [
1,
17
],
"end": [
1,
25
]
}
]
},
"summary": "Replaced the \"otherString\" string with the \"string\" string in the someFunction(1, \"string\", …, true) function call"
},
{
"span": {
"replace": [
{
"start": [
1,
41
],
"end": [
1,
42
]
},
{
"start": [
1,
36
],
"end": [
1,
37
]
}
]
},
"summary": "Replaced the 'b' identifier with the 'a' identifier in the someFunction(1, \"string\", …, true) function call"
},
{
"span": {
"replace": [
{
"start": [
1,
43
],
"end": [
1,
44
]
},
{
"start": [
1,
38
],
"end": [
1,
39
]
}
]
},
"summary": "Replaced the 'c' identifier with the 'b' identifier in the someFunction(1, \"string\", …, true) function call"
},
{
"span": {
"replace": [
{
"start": [
1,
60
],
"end": [
1,
61
]
},
{
"start": [
1,
55
],
"end": [
1,
56
]
}
]
},
"summary": "Replaced the 'b' identifier with the 'a' identifier in the console.log(a) method call"
},
{
"span": {
"replace": [
{
"start": [
1,
71
],
"end": [
1,
72
]
},
{
"start": [
1,
66
],
"end": [
1,
67
]
}
]
},
"summary": "Replaced the 'c' identifier with the 'b' identifier in the someFunction(1, \"string\", …, true) function call"
},
{
"span": {
"replace": [
{
"start": [
1,
77
],
"end": [
1,
82
]
},
{
"start": [
1,
72
],
"end": [
1,
76
]
}
]
},
"summary": "Replaced 'false' with 'true' in the someFunction(1, \"string\", …, true) function call"
}
]
},
"errors": {}
},
"filePaths": [
"function-call-args.js"
],
"patch": [
"diff --git a/function-call-args.js b/function-call-args.js",
"index 3f4ee6e..dc419cb 100644",
"--- a/function-call-args.js",
"+++ b/function-call-args.js",
"@@ -1,3 +1,3 @@",
"-someFunction(1, \"otherString\", function(b,c) { console.log(b); return c; }, false)",
"+someFunction(1, \"string\", function(a,b) { console.log(a); return b; }, true)",
" someFunction(1, \"string\", function(a,b) { console.log(a); return b; }, true)",
" someFunction(1, \"string\", function(a,b) { console.log(a); return b; }, true)"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "539cee544c8600977bd76181a692ef4e27c4b759..f808e14f78dbe08885649be38dff25564f90fd98"
}
,{
"testCaseDescription": "javascript-function-call-args-replacement-test",
"expectedResult": {
"changes": {
"function-call-args.js": [
{
"span": {
"replace": [
{
"start": [
1,
17
],
"end": [
1,
25
]
},
{
"start": [
1,
17
],
"end": [
1,
30
]
}
]
},
"summary": "Replaced the \"string\" string with the \"otherString\" string in the someFunction(1, \"otherString\", …, false) function call"
},
{
"span": {
"replace": [
{
"start": [
1,
36
],
"end": [
1,
37
]
},
{
"start": [
1,
41
],
"end": [
1,
42
]
}
]
},
"summary": "Replaced the 'a' identifier with the 'b' identifier in the someFunction(1, \"otherString\", …, false) function call"
},
{
"span": {
"replace": [
{
"start": [
1,
38
],
"end": [
1,
39
]
},
{
"start": [
1,
43
],
"end": [
1,
44
]
}
]
},
"summary": "Replaced the 'b' identifier with the 'c' identifier in the someFunction(1, \"otherString\", …, false) function call"
},
{
"span": {
"replace": [
{
"start": [
1,
55
],
"end": [
1,
56
]
},
{
"start": [
1,
60
],
"end": [
1,
61
]
}
]
},
"summary": "Replaced the 'a' identifier with the 'b' identifier in the console.log(b) method call"
},
{
"span": {
"replace": [
{
"start": [
1,
66
],
"end": [
1,
67
]
},
{
"start": [
1,
71
],
"end": [
1,
72
]
}
]
},
"summary": "Replaced the 'b' identifier with the 'c' identifier in the someFunction(1, \"otherString\", …, false) function call"
},
{
"span": {
"replace": [
{
"start": [
1,
72
],
"end": [
1,
76
]
},
{
"start": [
1,
77
],
"end": [
1,
82
]
}
]
},
"summary": "Replaced 'true' with 'false' in the someFunction(1, \"otherString\", …, false) function call"
}
]
},
"errors": {}
},
"filePaths": [
"function-call-args.js"
],
"patch": [
"diff --git a/function-call-args.js b/function-call-args.js",
"index dc419cb..3f4ee6e 100644",
"--- a/function-call-args.js",
"+++ b/function-call-args.js",
"@@ -1,3 +1,3 @@",
"-someFunction(1, \"string\", function(a,b) { console.log(a); return b; }, true)",
"+someFunction(1, \"otherString\", function(b,c) { console.log(b); return c; }, false)",
" someFunction(1, \"string\", function(a,b) { console.log(a); return b; }, true)",
" someFunction(1, \"string\", function(a,b) { console.log(a); return b; }, true)"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "f808e14f78dbe08885649be38dff25564f90fd98..6df8cc03d89ad9408f10b3e84a8168891e16c824"
}
,{
"testCaseDescription": "javascript-function-call-args-delete-replacement-test",
"expectedResult": {
"changes": {
"function-call-args.js": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
83
]
}
},
"summary": "Deleted the 'someFunction(1, \"otherString\", …, false)' function call"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
77
]
}
},
"summary": "Deleted the 'someFunction(1, \"string\", …, true)' function call"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
83
]
}
},
"summary": "Added the 'someFunction(1, \"otherString\", …, false)' function call"
}
]
},
"errors": {}
},
"filePaths": [
"function-call-args.js"
],
"patch": [
"diff --git a/function-call-args.js b/function-call-args.js",
"index 3f4ee6e..cae967b 100644",
"--- a/function-call-args.js",
"+++ b/function-call-args.js",
"@@ -1,3 +1,2 @@",
"-someFunction(1, \"otherString\", function(b,c) { console.log(b); return c; }, false)",
"-someFunction(1, \"string\", function(a,b) { console.log(a); return b; }, true)",
" someFunction(1, \"string\", function(a,b) { console.log(a); return b; }, true)",
"+someFunction(1, \"otherString\", function(b,c) { console.log(b); return c; }, false)"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "6df8cc03d89ad9408f10b3e84a8168891e16c824..8fe5a2260c0258b29e266f904dcdb1dbe02d4c10"
}
,{
"testCaseDescription": "javascript-function-call-args-delete-test",
"expectedResult": {
"changes": {
"function-call-args.js": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
77
]
}
},
"summary": "Deleted the 'someFunction(1, \"string\", …, true)' function call"
}
]
},
"errors": {}
},
"filePaths": [
"function-call-args.js"
],
"patch": [
"diff --git a/function-call-args.js b/function-call-args.js",
"index cae967b..0d19573 100644",
"--- a/function-call-args.js",
"+++ b/function-call-args.js",
"@@ -1,2 +1 @@",
"-someFunction(1, \"string\", function(a,b) { console.log(a); return b; }, true)",
" someFunction(1, \"otherString\", function(b,c) { console.log(b); return c; }, false)"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "8fe5a2260c0258b29e266f904dcdb1dbe02d4c10..657ddea03b3413ea6f2d4e8546403ec115769828"
}
,{
"testCaseDescription": "javascript-function-call-args-delete-rest-test",
"expectedResult": {
"changes": {
"function-call-args.js": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
83
]
}
},
"summary": "Deleted the 'someFunction(1, \"otherString\", …, false)' function call"
}
]
},
"errors": {}
},
"filePaths": [
"function-call-args.js"
],
"patch": [
"diff --git a/function-call-args.js b/function-call-args.js",
"index 0d19573..e69de29 100644",
"--- a/function-call-args.js",
"+++ b/function-call-args.js",
"@@ -1 +0,0 @@",
"-someFunction(1, \"otherString\", function(b,c) { console.log(b); return c; }, false)"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "657ddea03b3413ea6f2d4e8546403ec115769828..b1ed87edc6bf561edc524058ab781a95970a3258"
}]