mirror of
https://github.com/github/semantic.git
synced 2024-12-23 23:11:50 +03:00
510 lines
17 KiB
JSON
510 lines
17 KiB
JSON
[{
|
|
"testCaseDescription": "javascript-anonymous-function-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"anonymous-function.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
32
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added an anonymous(a, b) function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"anonymous-function.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/anonymous-function.js b/anonymous-function.js",
|
|
"index e69de29..b592868 100644",
|
|
"--- a/anonymous-function.js",
|
|
"+++ b/anonymous-function.js",
|
|
"@@ -0,0 +1 @@",
|
|
"+function(a,b) { return a + b; }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "5f4dfa791577127cebc7f5fa8c7d94b7427980f3..2e9eda4d95ac6cbdd16de3ad1464523de63ffb44"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-anonymous-function-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"anonymous-function.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
32
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added an anonymous(b, c) function"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
32
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added an anonymous(a, b) function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"anonymous-function.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/anonymous-function.js b/anonymous-function.js",
|
|
"index b592868..e1de356 100644",
|
|
"--- a/anonymous-function.js",
|
|
"+++ b/anonymous-function.js",
|
|
"@@ -1 +1,3 @@",
|
|
"+function(b,c) { return b * c; }",
|
|
"+function(a,b) { return a + b; }",
|
|
" function(a,b) { return a + b; }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "2e9eda4d95ac6cbdd16de3ad1464523de63ffb44..d6d789dd70b74b099621405aaab5cbb25e1a47eb"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-anonymous-function-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"anonymous-function.js": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
10
|
|
],
|
|
"end": [
|
|
1,
|
|
11
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
10
|
|
],
|
|
"end": [
|
|
1,
|
|
11
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'b' identifier with the 'a' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
12
|
|
],
|
|
"end": [
|
|
1,
|
|
13
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
12
|
|
],
|
|
"end": [
|
|
1,
|
|
13
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'c' identifier with the 'b' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
24
|
|
],
|
|
"end": [
|
|
1,
|
|
25
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
24
|
|
],
|
|
"end": [
|
|
1,
|
|
25
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'b' identifier with the 'a' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
28
|
|
],
|
|
"end": [
|
|
1,
|
|
29
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
28
|
|
],
|
|
"end": [
|
|
1,
|
|
29
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'c' identifier with the 'b' identifier"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"anonymous-function.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/anonymous-function.js b/anonymous-function.js",
|
|
"index e1de356..4ca0d4c 100644",
|
|
"--- a/anonymous-function.js",
|
|
"+++ b/anonymous-function.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-function(b,c) { return b * c; }",
|
|
"+function(a,b) { return a + b; }",
|
|
" function(a,b) { return a + b; }",
|
|
" function(a,b) { return a + b; }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "d6d789dd70b74b099621405aaab5cbb25e1a47eb..d40be86ea2ce078c6a426ce0a8c252a71892113a"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-anonymous-function-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"anonymous-function.js": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
10
|
|
],
|
|
"end": [
|
|
1,
|
|
11
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
10
|
|
],
|
|
"end": [
|
|
1,
|
|
11
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'a' identifier with the 'b' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
12
|
|
],
|
|
"end": [
|
|
1,
|
|
13
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
12
|
|
],
|
|
"end": [
|
|
1,
|
|
13
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'b' identifier with the 'c' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
24
|
|
],
|
|
"end": [
|
|
1,
|
|
25
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
24
|
|
],
|
|
"end": [
|
|
1,
|
|
25
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'a' identifier with the 'b' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
28
|
|
],
|
|
"end": [
|
|
1,
|
|
29
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
28
|
|
],
|
|
"end": [
|
|
1,
|
|
29
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'b' identifier with the 'c' identifier"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"anonymous-function.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/anonymous-function.js b/anonymous-function.js",
|
|
"index 4ca0d4c..e1de356 100644",
|
|
"--- a/anonymous-function.js",
|
|
"+++ b/anonymous-function.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-function(a,b) { return a + b; }",
|
|
"+function(b,c) { return b * c; }",
|
|
" function(a,b) { return a + b; }",
|
|
" function(a,b) { return a + b; }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "d40be86ea2ce078c6a426ce0a8c252a71892113a..fbe8b2947cb17ec793516f3368dd2f787bccfe66"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-anonymous-function-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"anonymous-function.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
32
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted an anonymous(b, c) function"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
32
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted an anonymous(a, b) function"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
32
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added an anonymous(b, c) function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"anonymous-function.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/anonymous-function.js b/anonymous-function.js",
|
|
"index e1de356..afdaccf 100644",
|
|
"--- a/anonymous-function.js",
|
|
"+++ b/anonymous-function.js",
|
|
"@@ -1,3 +1,2 @@",
|
|
"-function(b,c) { return b * c; }",
|
|
"-function(a,b) { return a + b; }",
|
|
" function(a,b) { return a + b; }",
|
|
"+function(b,c) { return b * c; }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "fbe8b2947cb17ec793516f3368dd2f787bccfe66..260e74caf2632a2de525e1341d76ed31cc8cf2bf"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-anonymous-function-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"anonymous-function.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
32
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted an anonymous(a, b) function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"anonymous-function.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/anonymous-function.js b/anonymous-function.js",
|
|
"index afdaccf..9f1856f 100644",
|
|
"--- a/anonymous-function.js",
|
|
"+++ b/anonymous-function.js",
|
|
"@@ -1,2 +1 @@",
|
|
"-function(a,b) { return a + b; }",
|
|
" function(b,c) { return b * c; }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "260e74caf2632a2de525e1341d76ed31cc8cf2bf..f425fbe0cbbd72279ea1a69e34baa8e341700a09"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-anonymous-function-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"anonymous-function.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
32
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted an anonymous(b, c) function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"anonymous-function.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/anonymous-function.js b/anonymous-function.js",
|
|
"index 9f1856f..e69de29 100644",
|
|
"--- a/anonymous-function.js",
|
|
"+++ b/anonymous-function.js",
|
|
"@@ -1 +0,0 @@",
|
|
"-function(b,c) { return b * c; }"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "f425fbe0cbbd72279ea1a69e34baa8e341700a09..2a5f85a471c9c83f2e835139afa5eb7bfecd546a"
|
|
}]
|