1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 16:02:43 +03:00
semantic/test/corpus/diff-summaries/javascript/if.json

348 lines
10 KiB
JSON
Raw Normal View History

2016-10-11 18:12:20 +03:00
[{
"testCaseDescription": "javascript-if-insert-test",
"expectedResult": {
"changes": {
"if.js": [
{
"span": {
2016-10-11 18:54:47 +03:00
"insert": {
2016-10-11 18:12:20 +03:00
"start": [
1,
1
],
"end": [
1,
19
]
}
},
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.js"
],
"patch": [
"diff --git a/if.js b/if.js",
"index e69de29b..52d4b4f0 100644",
"--- a/if.js",
"+++ b/if.js",
"@@ -0,0 +1 @@",
"+if (x) { log(y); }"
],
2016-10-11 18:12:20 +03:00
"gitDir": "test/corpus/repos/javascript",
"shas": "2440322c22f20e4b94216aa19cb2249a68864183..04f79bcb21f45b7628fee6124f78750926911c04"
2016-10-11 18:12:20 +03:00
}
,{
"testCaseDescription": "javascript-if-replacement-insert-test",
"expectedResult": {
"changes": {
"if.js": [
{
"span": {
2016-10-11 18:54:47 +03:00
"insert": {
2016-10-11 18:12:20 +03:00
"start": [
1,
1
],
"end": [
1,
24
]
}
},
2016-10-11 23:17:34 +03:00
"summary": "Added the 'a.b' 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": [
2,
19
]
}
},
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.js"
],
"patch": [
"diff --git a/if.js b/if.js",
"index 52d4b4f0..ae4ee328 100644",
"--- a/if.js",
"+++ b/if.js",
"@@ -1 +1,3 @@",
"+if (a.b) { log(c); d; }",
"+if (x) { log(y); }",
" if (x) { log(y); }"
],
2016-10-11 18:12:20 +03:00
"gitDir": "test/corpus/repos/javascript",
"shas": "04f79bcb21f45b7628fee6124f78750926911c04..559c420865a54f68f3b553b2a5da258f46f44883"
2016-10-11 18:12:20 +03:00
}
,{
"testCaseDescription": "javascript-if-delete-insert-test",
"expectedResult": {
"changes": {
"if.js": [
{
"span": {
2016-10-11 18:54:47 +03:00
"replace": [
2016-10-11 18:12:20 +03:00
{
"start": [
1,
1
],
"end": [
1,
24
]
},
{
"start": [
1,
1
],
"end": [
1,
19
]
}
]
},
2016-10-11 23:17:34 +03:00
"summary": "Replaced the 'a.b' if statement with the 'x' if statement"
2016-10-11 18:12:20 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"if.js"
],
"patch": [
"diff --git a/if.js b/if.js",
"index ae4ee328..df55832d 100644",
"--- a/if.js",
"+++ b/if.js",
"@@ -1,3 +1,3 @@",
"-if (a.b) { log(c); d; }",
"+if (x) { log(y); }",
" if (x) { log(y); }",
" if (x) { log(y); }"
],
2016-10-11 18:12:20 +03:00
"gitDir": "test/corpus/repos/javascript",
"shas": "559c420865a54f68f3b553b2a5da258f46f44883..553c63f27c2226d27a3c8271282b468ef743e77b"
2016-10-11 18:12:20 +03:00
}
,{
"testCaseDescription": "javascript-if-replacement-test",
"expectedResult": {
"changes": {
"if.js": [
{
"span": {
2016-10-11 18:54:47 +03:00
"replace": [
2016-10-11 18:12:20 +03:00
{
"start": [
1,
1
],
"end": [
1,
19
]
},
{
"start": [
1,
1
],
"end": [
1,
24
]
}
]
},
2016-10-11 23:17:34 +03:00
"summary": "Replaced the 'x' if statement with the 'a.b' if statement"
2016-10-11 18:12:20 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"if.js"
],
"patch": [
"diff --git a/if.js b/if.js",
"index df55832d..ae4ee328 100644",
"--- a/if.js",
"+++ b/if.js",
"@@ -1,3 +1,3 @@",
"-if (x) { log(y); }",
"+if (a.b) { log(c); d; }",
" if (x) { log(y); }",
" if (x) { log(y); }"
],
2016-10-11 18:12:20 +03:00
"gitDir": "test/corpus/repos/javascript",
"shas": "553c63f27c2226d27a3c8271282b468ef743e77b..c0a157045745524611f08863f811af735ec7661d"
2016-10-11 18:12:20 +03:00
}
,{
"testCaseDescription": "javascript-if-delete-replacement-test",
"expectedResult": {
"changes": {
"if.js": [
{
"span": {
2016-10-11 18:54:47 +03:00
"delete": {
2016-10-11 18:12:20 +03:00
"start": [
1,
1
],
"end": [
1,
24
]
}
},
2016-10-11 23:17:34 +03:00
"summary": "Deleted the 'a.b' 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": [
2,
19
]
}
},
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": [
2,
24
]
}
},
2016-10-11 23:17:34 +03:00
"summary": "Added the 'a.b' if statement"
2016-10-11 18:12:20 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"if.js"
],
"patch": [
"diff --git a/if.js b/if.js",
"index ae4ee328..38b83efe 100644",
"--- a/if.js",
"+++ b/if.js",
"@@ -1,3 +1,2 @@",
"-if (a.b) { log(c); d; }",
"-if (x) { log(y); }",
" if (x) { log(y); }",
"+if (a.b) { log(c); d; }"
],
2016-10-11 18:12:20 +03:00
"gitDir": "test/corpus/repos/javascript",
"shas": "c0a157045745524611f08863f811af735ec7661d..3ed95396271b583c92b9c6fecb31bdd55c139fd6"
2016-10-11 18:12:20 +03:00
}
,{
"testCaseDescription": "javascript-if-delete-test",
"expectedResult": {
"changes": {
"if.js": [
{
"span": {
2016-10-11 18:54:47 +03:00
"delete": {
2016-10-11 18:12:20 +03:00
"start": [
1,
1
],
"end": [
1,
19
]
}
},
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.js"
],
"patch": [
"diff --git a/if.js b/if.js",
"index 38b83efe..f67163bb 100644",
"--- a/if.js",
"+++ b/if.js",
"@@ -1,2 +1 @@",
"-if (x) { log(y); }",
" if (a.b) { log(c); d; }"
],
2016-10-11 18:12:20 +03:00
"gitDir": "test/corpus/repos/javascript",
"shas": "3ed95396271b583c92b9c6fecb31bdd55c139fd6..6705df9f639062177eaf9e73f3f265fb26a009e1"
2016-10-11 18:12:20 +03:00
}
,{
"testCaseDescription": "javascript-if-delete-rest-test",
"expectedResult": {
"changes": {
"if.js": [
{
"span": {
2016-10-11 18:54:47 +03:00
"delete": {
2016-10-11 18:12:20 +03:00
"start": [
1,
1
],
"end": [
1,
24
]
}
},
2016-10-11 23:17:34 +03:00
"summary": "Deleted the 'a.b' if statement"
2016-10-11 18:12:20 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"if.js"
],
"patch": [
"diff --git a/if.js b/if.js",
"index f67163bb..e69de29b 100644",
"--- a/if.js",
"+++ b/if.js",
"@@ -1 +0,0 @@",
"-if (a.b) { log(c); d; }"
],
2016-10-11 18:12:20 +03:00
"gitDir": "test/corpus/repos/javascript",
"shas": "6705df9f639062177eaf9e73f3f265fb26a009e1..9b27e4158f8b990b3f7ca2f77fcf65bf40e26802"
2016-10-11 18:12:20 +03:00
}]