1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 14:54:16 +03:00
semantic/test/corpus/diff-summaries/javascript/anonymous-function.json

456 lines
15 KiB
JSON
Raw Normal View History

2016-10-11 18:12:20 +03:00
[{
"testCaseDescription": "javascript-anonymous-function-insert-test",
"expectedResult": {
"changes": {
"anonymous-function.js": [
{
"span": {
2016-10-11 18:54:47 +03:00
"insert": {
2016-10-11 18:12:20 +03:00
"start": [
1,
1
],
"end": [
1,
32
]
}
},
2016-10-11 23:17:34 +03:00
"summary": "Added an anonymous(a, b) function"
2016-10-11 18:12:20 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"anonymous-function.js"
],
"patch": [
"diff --git a/anonymous-function.js b/anonymous-function.js",
"index e69de29b..b5928681 100644",
"--- a/anonymous-function.js",
"+++ b/anonymous-function.js",
"@@ -0,0 +1 @@",
"+function(a,b) { return a + b; }"
],
2016-10-11 18:12:20 +03:00
"gitDir": "test/corpus/repos/javascript",
"shas": "07a785cb4f0cfa49a60fdfbbce7d8ecbfd2a820b..1ecbe6a443a701cf2b90740825d337914c3b01b8"
2016-10-11 18:12:20 +03:00
}
,{
"testCaseDescription": "javascript-anonymous-function-replacement-insert-test",
"expectedResult": {
"changes": {
"anonymous-function.js": [
{
"span": {
2016-10-11 18:54:47 +03:00
"insert": {
2016-10-11 18:12:20 +03:00
"start": [
1,
1
],
"end": [
1,
32
]
}
},
2016-10-11 23:17:34 +03:00
"summary": "Added an anonymous(b, c) function"
2016-10-11 18:12:20 +03:00
},
{
"span": {
2016-10-11 18:54:47 +03:00
"insert": {
2016-10-11 18:12:20 +03:00
"start": [
2,
1
],
"end": [
2,
32
]
}
},
2016-10-11 23:17:34 +03:00
"summary": "Added an anonymous(a, b) function"
2016-10-11 18:12:20 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"anonymous-function.js"
],
"patch": [
"diff --git a/anonymous-function.js b/anonymous-function.js",
"index b5928681..e1de356c 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; }"
],
2016-10-11 18:12:20 +03:00
"gitDir": "test/corpus/repos/javascript",
"shas": "1ecbe6a443a701cf2b90740825d337914c3b01b8..1e649afd16b0e9145c760bd152b90dbf2eeb1c79"
2016-10-11 18:12:20 +03:00
}
,{
"testCaseDescription": "javascript-anonymous-function-delete-insert-test",
"expectedResult": {
"changes": {
"anonymous-function.js": [
{
"span": {
2016-10-11 18:54:47 +03:00
"replace": [
2016-10-11 18:12:20 +03:00
{
"start": [
1,
10
],
"end": [
1,
11
]
},
{
"start": [
1,
10
],
"end": [
1,
11
]
}
]
},
2016-10-11 23:17:34 +03:00
"summary": "Replaced the 'b' identifier with the 'a' identifier"
2016-10-11 18:12:20 +03:00
},
{
"span": {
2016-10-11 18:54:47 +03:00
"replace": [
2016-10-11 18:12:20 +03:00
{
"start": [
1,
12
],
"end": [
1,
13
]
},
{
"start": [
1,
12
],
"end": [
1,
13
]
}
]
},
2016-10-11 23:17:34 +03:00
"summary": "Replaced the 'c' identifier with the 'b' identifier"
2016-10-11 18:12:20 +03:00
},
{
"span": {
2016-10-11 18:54:47 +03:00
"replace": [
2016-10-11 18:12:20 +03:00
{
"start": [
1,
24
],
"end": [
1,
29
]
},
{
"start": [
1,
24
2016-10-11 18:12:20 +03:00
],
"end": [
1,
29
]
}
]
},
"summary": "Replaced the 'b * c' math operator with the 'a + b' math operator"
2016-10-11 18:12:20 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"anonymous-function.js"
],
"patch": [
"diff --git a/anonymous-function.js b/anonymous-function.js",
"index e1de356c..4ca0d4c7 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; }"
],
2016-10-11 18:12:20 +03:00
"gitDir": "test/corpus/repos/javascript",
"shas": "1e649afd16b0e9145c760bd152b90dbf2eeb1c79..7fb344d8f58ce3935df46d0dc70e9f8f1896908f"
2016-10-11 18:12:20 +03:00
}
,{
"testCaseDescription": "javascript-anonymous-function-replacement-test",
"expectedResult": {
"changes": {
"anonymous-function.js": [
{
"span": {
2016-10-11 18:54:47 +03:00
"replace": [
2016-10-11 18:12:20 +03:00
{
"start": [
1,
10
],
"end": [
1,
11
]
},
{
"start": [
1,
10
],
"end": [
1,
11
]
}
]
},
2016-10-11 23:17:34 +03:00
"summary": "Replaced the 'a' identifier with the 'b' identifier"
2016-10-11 18:12:20 +03:00
},
{
"span": {
2016-10-11 18:54:47 +03:00
"replace": [
2016-10-11 18:12:20 +03:00
{
"start": [
1,
12
],
"end": [
1,
13
]
},
{
"start": [
1,
12
],
"end": [
1,
13
]
}
]
},
2016-10-11 23:17:34 +03:00
"summary": "Replaced the 'b' identifier with the 'c' identifier"
2016-10-11 18:12:20 +03:00
},
{
"span": {
2016-10-11 18:54:47 +03:00
"replace": [
2016-10-11 18:12:20 +03:00
{
"start": [
1,
24
],
"end": [
1,
29
]
},
{
"start": [
1,
24
2016-10-11 18:12:20 +03:00
],
"end": [
1,
29
]
}
]
},
"summary": "Replaced the 'a + b' math operator with the 'b * c' math operator"
2016-10-11 18:12:20 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"anonymous-function.js"
],
"patch": [
"diff --git a/anonymous-function.js b/anonymous-function.js",
"index 4ca0d4c7..e1de356c 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; }"
],
2016-10-11 18:12:20 +03:00
"gitDir": "test/corpus/repos/javascript",
"shas": "7fb344d8f58ce3935df46d0dc70e9f8f1896908f..6d835d52398bfc6715ef4c40d2706dd8c11cb83a"
2016-10-11 18:12:20 +03:00
}
,{
"testCaseDescription": "javascript-anonymous-function-delete-replacement-test",
"expectedResult": {
"changes": {
"anonymous-function.js": [
{
"span": {
2016-10-11 18:54:47 +03:00
"delete": {
2016-10-11 18:12:20 +03:00
"start": [
1,
1
],
"end": [
1,
32
]
}
},
2016-10-11 23:17:34 +03:00
"summary": "Deleted an anonymous(b, c) function"
2016-10-11 18:12:20 +03:00
},
{
"span": {
2016-10-11 18:54:47 +03:00
"delete": {
2016-10-11 18:12:20 +03:00
"start": [
2,
1
],
"end": [
2,
32
]
}
},
2016-10-11 23:17:34 +03:00
"summary": "Deleted an anonymous(a, b) function"
2016-10-11 18:12:20 +03:00
},
{
"span": {
2016-10-11 18:54:47 +03:00
"insert": {
2016-10-11 18:12:20 +03:00
"start": [
2,
1
],
"end": [
2,
32
]
}
},
2016-10-11 23:17:34 +03:00
"summary": "Added an anonymous(b, c) function"
2016-10-11 18:12:20 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"anonymous-function.js"
],
"patch": [
"diff --git a/anonymous-function.js b/anonymous-function.js",
"index e1de356c..afdaccf7 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; }"
],
2016-10-11 18:12:20 +03:00
"gitDir": "test/corpus/repos/javascript",
"shas": "6d835d52398bfc6715ef4c40d2706dd8c11cb83a..fa0cd2354feb5199209c9aa13525567951185c88"
2016-10-11 18:12:20 +03:00
}
,{
"testCaseDescription": "javascript-anonymous-function-delete-test",
"expectedResult": {
"changes": {
"anonymous-function.js": [
{
"span": {
2016-10-11 18:54:47 +03:00
"delete": {
2016-10-11 18:12:20 +03:00
"start": [
1,
1
],
"end": [
1,
32
]
}
},
2016-10-11 23:17:34 +03:00
"summary": "Deleted an anonymous(a, b) function"
2016-10-11 18:12:20 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"anonymous-function.js"
],
"patch": [
"diff --git a/anonymous-function.js b/anonymous-function.js",
"index afdaccf7..9f1856f5 100644",
"--- a/anonymous-function.js",
"+++ b/anonymous-function.js",
"@@ -1,2 +1 @@",
"-function(a,b) { return a + b; }",
" function(b,c) { return b * c; }"
],
2016-10-11 18:12:20 +03:00
"gitDir": "test/corpus/repos/javascript",
"shas": "fa0cd2354feb5199209c9aa13525567951185c88..a93d062ea69a6600b3f795d769e2557042925d66"
2016-10-11 18:12:20 +03:00
}
,{
"testCaseDescription": "javascript-anonymous-function-delete-rest-test",
"expectedResult": {
"changes": {
"anonymous-function.js": [
{
"span": {
2016-10-11 18:54:47 +03:00
"delete": {
2016-10-11 18:12:20 +03:00
"start": [
1,
1
],
"end": [
1,
32
]
}
},
2016-10-11 23:17:34 +03:00
"summary": "Deleted an anonymous(b, c) function"
2016-10-11 18:12:20 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"anonymous-function.js"
],
"patch": [
"diff --git a/anonymous-function.js b/anonymous-function.js",
"index 9f1856f5..e69de29b 100644",
"--- a/anonymous-function.js",
"+++ b/anonymous-function.js",
"@@ -1 +0,0 @@",
"-function(b,c) { return b * c; }"
],
2016-10-11 18:12:20 +03:00
"gitDir": "test/corpus/repos/javascript",
"shas": "a93d062ea69a6600b3f795d769e2557042925d66..80946fe6667b3843c0bd704136ac929ca5f2e3e0"
2016-10-11 18:12:20 +03:00
}]