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"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/anonymous-function.js b/anonymous-function.js",
|
2016-12-06 22:59:14 +03:00
|
|
|
"index e69de29b..b5928681 100644",
|
2016-11-04 01:41:59 +03:00
|
|
|
"--- 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",
|
2017-01-24 23:09:28 +03:00
|
|
|
"shas": "5bd86096402e987462d865b5963d5e68f31ef22d..ba054a01632544846e183487e942b55c700841d4"
|
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"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/anonymous-function.js b/anonymous-function.js",
|
2016-12-06 22:59:14 +03:00
|
|
|
"index b5928681..e1de356c 100644",
|
2016-11-04 01:41:59 +03:00
|
|
|
"--- 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",
|
2017-01-24 23:09:28 +03:00
|
|
|
"shas": "ba054a01632544846e183487e942b55c700841d4..4e386f088a9b83fb0712ede76f926ec4ab503bcc"
|
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,
|
2016-12-06 22:59:14 +03:00
|
|
|
24
|
2016-10-11 18:12:20 +03:00
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
29
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2016-12-06 22:59:14 +03:00
|
|
|
"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"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/anonymous-function.js b/anonymous-function.js",
|
2016-12-06 22:59:14 +03:00
|
|
|
"index e1de356c..4ca0d4c7 100644",
|
2016-11-04 01:41:59 +03:00
|
|
|
"--- 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",
|
2017-01-24 23:09:28 +03:00
|
|
|
"shas": "4e386f088a9b83fb0712ede76f926ec4ab503bcc..37cd59e66cfa065774478f33d8c62adefe5459db"
|
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,
|
2016-12-06 22:59:14 +03:00
|
|
|
24
|
2016-10-11 18:12:20 +03:00
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
29
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2016-12-06 22:59:14 +03:00
|
|
|
"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"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/anonymous-function.js b/anonymous-function.js",
|
2016-12-06 22:59:14 +03:00
|
|
|
"index 4ca0d4c7..e1de356c 100644",
|
2016-11-04 01:41:59 +03:00
|
|
|
"--- 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",
|
2017-01-24 23:09:28 +03:00
|
|
|
"shas": "37cd59e66cfa065774478f33d8c62adefe5459db..14d01e8232e8ab4ef9923517701cea5a39d9a06e"
|
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"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/anonymous-function.js b/anonymous-function.js",
|
2016-12-06 22:59:14 +03:00
|
|
|
"index e1de356c..afdaccf7 100644",
|
2016-11-04 01:41:59 +03:00
|
|
|
"--- 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",
|
2017-01-24 23:09:28 +03:00
|
|
|
"shas": "14d01e8232e8ab4ef9923517701cea5a39d9a06e..62def272c237a2ea3061d38022bca1545f62425f"
|
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"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/anonymous-function.js b/anonymous-function.js",
|
2016-12-06 22:59:14 +03:00
|
|
|
"index afdaccf7..9f1856f5 100644",
|
2016-11-04 01:41:59 +03:00
|
|
|
"--- 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",
|
2017-01-24 23:09:28 +03:00
|
|
|
"shas": "62def272c237a2ea3061d38022bca1545f62425f..9c2e4c2c0015178634b7747dbc99adffc733ad14"
|
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"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/anonymous-function.js b/anonymous-function.js",
|
2016-12-06 22:59:14 +03:00
|
|
|
"index 9f1856f5..e69de29b 100644",
|
2016-11-04 01:41:59 +03:00
|
|
|
"--- 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",
|
2017-01-24 23:09:28 +03:00
|
|
|
"shas": "9c2e4c2c0015178634b7747dbc99adffc733ad14..c18d7bf565cc21b4eab97bee06b8182d71f79310"
|
2016-10-11 18:12:20 +03:00
|
|
|
}]
|