2016-10-11 18:12:20 +03:00
|
|
|
[{
|
|
|
|
"testCaseDescription": "javascript-if-else-insert-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"if-else.js": [
|
|
|
|
{
|
|
|
|
"span": {
|
2016-10-11 18:54:47 +03:00
|
|
|
"insert": {
|
2016-10-11 18:12:20 +03:00
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-10-12 22:55:59 +03:00
|
|
|
2,
|
|
|
|
1
|
2016-10-11 18:12:20 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-10-11 23:17:34 +03:00
|
|
|
"summary": "Added the 'x' if statement"
|
2016-10-11 18:12:20 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"if-else.js"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/if-else.js b/if-else.js",
|
|
|
|
"index e69de29..d81ebad 100644",
|
|
|
|
"--- a/if-else.js",
|
|
|
|
"+++ b/if-else.js",
|
|
|
|
"@@ -0,0 +1 @@",
|
|
|
|
"+if (x) y; else if (a) b; else if (c) d; else if (e) f; else g"
|
|
|
|
],
|
2016-10-11 18:12:20 +03:00
|
|
|
"gitDir": "test/corpus/repos/javascript",
|
2016-11-04 01:41:59 +03:00
|
|
|
"shas": "ee538d5b471190fe27f80e1defc319f36f5f9c38..d5f532daeb84c4dd664519d388575b8891e7e25a"
|
2016-10-11 18:12:20 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "javascript-if-else-replacement-insert-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"if-else.js": [
|
|
|
|
{
|
|
|
|
"span": {
|
2016-10-11 18:54:47 +03:00
|
|
|
"insert": {
|
2016-10-11 18:12:20 +03:00
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-10-12 22:55:59 +03:00
|
|
|
2,
|
|
|
|
1
|
2016-10-11 18:12:20 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-10-12 22:55:59 +03:00
|
|
|
"summary": "Added the 'g' if statement"
|
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": [
|
2016-10-12 22:55:59 +03:00
|
|
|
3,
|
|
|
|
1
|
2016-10-11 18:12:20 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-10-11 23:17:34 +03:00
|
|
|
"summary": "Added the 'x' if statement"
|
2016-10-11 18:12:20 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"if-else.js"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/if-else.js b/if-else.js",
|
|
|
|
"index d81ebad..6bb0eaa 100644",
|
|
|
|
"--- a/if-else.js",
|
|
|
|
"+++ b/if-else.js",
|
|
|
|
"@@ -1 +1,3 @@",
|
|
|
|
"+if (g) h; else if (i) { j; } else if (k) l; else if (m) { n; } else o",
|
|
|
|
"+if (x) y; else if (a) b; else if (c) d; else if (e) f; else g",
|
|
|
|
" if (x) y; else if (a) b; else if (c) d; else if (e) f; else g"
|
|
|
|
],
|
2016-10-11 18:12:20 +03:00
|
|
|
"gitDir": "test/corpus/repos/javascript",
|
2016-11-04 01:41:59 +03:00
|
|
|
"shas": "d5f532daeb84c4dd664519d388575b8891e7e25a..539d5f1eb9ec34131ed8d31c596c38285f83e6bf"
|
2016-10-11 18:12:20 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "javascript-if-else-delete-insert-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"if-else.js": [
|
|
|
|
{
|
|
|
|
"span": {
|
2016-10-11 18:54:47 +03:00
|
|
|
"replace": [
|
2016-10-11 18:12:20 +03:00
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
2016-10-12 22:55:59 +03:00
|
|
|
5
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
6
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
5
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
6
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"summary": "Replaced the 'g' identifier with the 'x' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
8
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
9
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
8
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
9
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"summary": "Replaced the 'h' identifier with the 'y' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
20
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
21
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
20
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
21
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"summary": "Replaced the 'i' identifier with the 'a' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
23
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
24
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'b' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
25
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
26
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'j' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
39
|
2016-10-11 18:12:20 +03:00
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
2016-10-12 22:55:59 +03:00
|
|
|
40
|
2016-10-11 18:12:20 +03:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
2016-10-12 22:55:59 +03:00
|
|
|
35
|
2016-10-11 18:12:20 +03:00
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
2016-10-12 22:55:59 +03:00
|
|
|
36
|
2016-10-11 18:12:20 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2016-10-12 22:55:59 +03:00
|
|
|
"summary": "Replaced the 'k' identifier with the 'c' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
42
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
43
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
38
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
39
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"summary": "Replaced the 'l' identifier with the 'd' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
54
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
55
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
50
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
51
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"summary": "Replaced the 'm' identifier with the 'e' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
53
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
54
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'f' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
59
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
60
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'n' identifier"
|
2016-10-14 00:44:36 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
69
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
70
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
61
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
62
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"summary": "Replaced the 'o' identifier with the 'g' identifier"
|
2016-10-11 18:12:20 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"if-else.js"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/if-else.js b/if-else.js",
|
|
|
|
"index 6bb0eaa..2034be1 100644",
|
|
|
|
"--- a/if-else.js",
|
|
|
|
"+++ b/if-else.js",
|
|
|
|
"@@ -1,3 +1,3 @@",
|
|
|
|
"-if (g) h; else if (i) { j; } else if (k) l; else if (m) { n; } else o",
|
|
|
|
"+if (x) y; else if (a) b; else if (c) d; else if (e) f; else g",
|
|
|
|
" if (x) y; else if (a) b; else if (c) d; else if (e) f; else g",
|
|
|
|
" if (x) y; else if (a) b; else if (c) d; else if (e) f; else g"
|
|
|
|
],
|
2016-10-11 18:12:20 +03:00
|
|
|
"gitDir": "test/corpus/repos/javascript",
|
2016-11-04 01:41:59 +03:00
|
|
|
"shas": "539d5f1eb9ec34131ed8d31c596c38285f83e6bf..f525e3671aa6d43caf17c2582f3c746f07570b7a"
|
2016-10-11 18:12:20 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "javascript-if-else-replacement-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"if-else.js": [
|
|
|
|
{
|
|
|
|
"span": {
|
2016-10-11 18:54:47 +03:00
|
|
|
"replace": [
|
2016-10-11 18:12:20 +03:00
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
2016-10-12 22:55:59 +03:00
|
|
|
5
|
2016-10-11 18:12:20 +03:00
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
2016-10-12 22:55:59 +03:00
|
|
|
6
|
2016-10-11 18:12:20 +03:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
2016-10-12 22:55:59 +03:00
|
|
|
5
|
2016-10-11 18:12:20 +03:00
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
2016-10-12 22:55:59 +03:00
|
|
|
6
|
2016-10-11 18:12:20 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2016-10-12 22:55:59 +03:00
|
|
|
"summary": "Replaced the 'x' identifier with the 'g' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
8
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
9
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
8
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
9
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"summary": "Replaced the 'y' identifier with the 'h' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
20
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
21
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
20
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
21
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"summary": "Replaced the 'a' identifier with the 'i' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
25
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
26
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'j' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
23
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
24
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'b' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
35
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
36
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
39
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
40
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"summary": "Replaced the 'c' identifier with the 'k' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
38
|
2016-10-11 18:12:20 +03:00
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
2016-10-12 22:55:59 +03:00
|
|
|
39
|
2016-10-11 18:12:20 +03:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
2016-10-12 22:55:59 +03:00
|
|
|
42
|
2016-10-11 18:12:20 +03:00
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
2016-10-12 22:55:59 +03:00
|
|
|
43
|
2016-10-11 18:12:20 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2016-10-12 22:55:59 +03:00
|
|
|
"summary": "Replaced the 'd' identifier with the 'l' 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,
|
2016-10-12 22:55:59 +03:00
|
|
|
50
|
2016-10-11 18:12:20 +03:00
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
2016-10-12 22:55:59 +03:00
|
|
|
51
|
2016-10-11 18:12:20 +03:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
2016-10-12 22:55:59 +03:00
|
|
|
54
|
2016-10-11 18:12:20 +03:00
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
2016-10-12 22:55:59 +03:00
|
|
|
55
|
2016-10-11 18:12:20 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2016-10-12 22:55:59 +03:00
|
|
|
"summary": "Replaced the 'e' identifier with the 'm' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
59
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
60
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'n' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
53
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
54
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'f' identifier"
|
2016-10-14 00:44:36 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
61
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
62
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
69
|
|
|
|
],
|
|
|
|
"end": [
|
|
|
|
1,
|
|
|
|
70
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"summary": "Replaced the 'g' identifier with the 'o' identifier"
|
2016-10-11 18:12:20 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"if-else.js"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/if-else.js b/if-else.js",
|
|
|
|
"index 2034be1..6bb0eaa 100644",
|
|
|
|
"--- a/if-else.js",
|
|
|
|
"+++ b/if-else.js",
|
|
|
|
"@@ -1,3 +1,3 @@",
|
|
|
|
"-if (x) y; else if (a) b; else if (c) d; else if (e) f; else g",
|
|
|
|
"+if (g) h; else if (i) { j; } else if (k) l; else if (m) { n; } else o",
|
|
|
|
" if (x) y; else if (a) b; else if (c) d; else if (e) f; else g",
|
|
|
|
" if (x) y; else if (a) b; else if (c) d; else if (e) f; else g"
|
|
|
|
],
|
2016-10-11 18:12:20 +03:00
|
|
|
"gitDir": "test/corpus/repos/javascript",
|
2016-11-04 01:41:59 +03:00
|
|
|
"shas": "f525e3671aa6d43caf17c2582f3c746f07570b7a..9fce9df9688253990d3fcfa4eb8f2280aa1c0c7c"
|
2016-10-11 18:12:20 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "javascript-if-else-delete-replacement-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"if-else.js": [
|
|
|
|
{
|
|
|
|
"span": {
|
2016-10-11 18:54:47 +03:00
|
|
|
"delete": {
|
2016-10-11 18:12:20 +03:00
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-10-12 22:55:59 +03:00
|
|
|
2,
|
|
|
|
1
|
2016-10-11 18:12:20 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-10-12 22:55:59 +03:00
|
|
|
"summary": "Deleted the 'g' if statement"
|
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": [
|
2016-10-12 22:55:59 +03:00
|
|
|
3,
|
|
|
|
1
|
2016-10-11 18:12:20 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-10-11 23:17:34 +03:00
|
|
|
"summary": "Deleted the 'x' if statement"
|
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": [
|
2016-10-12 22:55:59 +03:00
|
|
|
3,
|
|
|
|
1
|
2016-10-11 18:12:20 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-10-12 22:55:59 +03:00
|
|
|
"summary": "Added the 'g' if statement"
|
2016-10-11 18:12:20 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"if-else.js"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/if-else.js b/if-else.js",
|
|
|
|
"index 6bb0eaa..e26d6c4 100644",
|
|
|
|
"--- a/if-else.js",
|
|
|
|
"+++ b/if-else.js",
|
|
|
|
"@@ -1,3 +1,2 @@",
|
|
|
|
"-if (g) h; else if (i) { j; } else if (k) l; else if (m) { n; } else o",
|
|
|
|
"-if (x) y; else if (a) b; else if (c) d; else if (e) f; else g",
|
|
|
|
" if (x) y; else if (a) b; else if (c) d; else if (e) f; else g",
|
|
|
|
"+if (g) h; else if (i) { j; } else if (k) l; else if (m) { n; } else o"
|
|
|
|
],
|
2016-10-11 18:12:20 +03:00
|
|
|
"gitDir": "test/corpus/repos/javascript",
|
2016-11-04 01:41:59 +03:00
|
|
|
"shas": "9fce9df9688253990d3fcfa4eb8f2280aa1c0c7c..f5b900cb596f7084a32ca9441f01e9be4b1e27dd"
|
2016-10-11 18:12:20 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "javascript-if-else-delete-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"if-else.js": [
|
|
|
|
{
|
|
|
|
"span": {
|
2016-10-11 18:54:47 +03:00
|
|
|
"delete": {
|
2016-10-11 18:12:20 +03:00
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-10-12 22:55:59 +03:00
|
|
|
2,
|
|
|
|
1
|
2016-10-11 18:12:20 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-10-11 23:17:34 +03:00
|
|
|
"summary": "Deleted the 'x' if statement"
|
2016-10-11 18:12:20 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"if-else.js"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/if-else.js b/if-else.js",
|
|
|
|
"index e26d6c4..1a55d0b 100644",
|
|
|
|
"--- a/if-else.js",
|
|
|
|
"+++ b/if-else.js",
|
|
|
|
"@@ -1,2 +1 @@",
|
|
|
|
"-if (x) y; else if (a) b; else if (c) d; else if (e) f; else g",
|
|
|
|
" if (g) h; else if (i) { j; } else if (k) l; else if (m) { n; } else o"
|
|
|
|
],
|
2016-10-11 18:12:20 +03:00
|
|
|
"gitDir": "test/corpus/repos/javascript",
|
2016-11-04 01:41:59 +03:00
|
|
|
"shas": "f5b900cb596f7084a32ca9441f01e9be4b1e27dd..c3bb4c6e35fc4755d18a5e0fb53d5410a476c039"
|
2016-10-11 18:12:20 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "javascript-if-else-delete-rest-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"if-else.js": [
|
|
|
|
{
|
|
|
|
"span": {
|
2016-10-11 18:54:47 +03:00
|
|
|
"delete": {
|
2016-10-11 18:12:20 +03:00
|
|
|
"start": [
|
|
|
|
1,
|
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-10-12 22:55:59 +03:00
|
|
|
2,
|
|
|
|
1
|
2016-10-11 18:12:20 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
2016-10-12 22:55:59 +03:00
|
|
|
"summary": "Deleted the 'g' if statement"
|
2016-10-11 18:12:20 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"if-else.js"
|
|
|
|
],
|
2016-11-04 01:41:59 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/if-else.js b/if-else.js",
|
|
|
|
"index 1a55d0b..e69de29 100644",
|
|
|
|
"--- a/if-else.js",
|
|
|
|
"+++ b/if-else.js",
|
|
|
|
"@@ -1 +0,0 @@",
|
|
|
|
"-if (g) h; else if (i) { j; } else if (k) l; else if (m) { n; } else o"
|
|
|
|
],
|
2016-10-11 18:12:20 +03:00
|
|
|
"gitDir": "test/corpus/repos/javascript",
|
2016-11-04 01:41:59 +03:00
|
|
|
"shas": "c3bb4c6e35fc4755d18a5e0fb53d5410a476c039..dffe792710a5ad52de12ed62e48340a71e5c9227"
|
2016-10-11 18:12:20 +03:00
|
|
|
}]
|