1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 23:11:50 +03:00
semantic/test/corpus/diff-summaries/javascript/assignment.json
2016-11-03 16:02:56 -07:00

348 lines
10 KiB
JSON

[{
"testCaseDescription": "javascript-assignment-insert-test",
"expectedResult": {
"changes": {
"assignment.js": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
6
]
}
},
"summary": "Added the 'x' assignment"
}
]
},
"errors": {}
},
"filePaths": [
"assignment.js"
],
"patch": [
"diff --git a/assignment.js b/assignment.js",
"index e69de29..6882fe5 100644",
"--- a/assignment.js",
"+++ b/assignment.js",
"@@ -0,0 +1 @@",
"+x = 0;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "10c888c0caabf36cb211a96640afbe435dfad3fb..6a5eb86577a86881fdd53c3db17dd589617b887e"
}
,{
"testCaseDescription": "javascript-assignment-replacement-insert-test",
"expectedResult": {
"changes": {
"assignment.js": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
6
]
}
},
"summary": "Added the 'x' assignment"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
6
]
}
},
"summary": "Added the 'x' assignment"
}
]
},
"errors": {}
},
"filePaths": [
"assignment.js"
],
"patch": [
"diff --git a/assignment.js b/assignment.js",
"index 6882fe5..fb4cba4 100644",
"--- a/assignment.js",
"+++ b/assignment.js",
"@@ -1 +1,3 @@",
"+x = 1;",
"+x = 0;",
" x = 0;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "6a5eb86577a86881fdd53c3db17dd589617b887e..79ca8610276bd0cc32d257702e20ec268187f1b6"
}
,{
"testCaseDescription": "javascript-assignment-delete-insert-test",
"expectedResult": {
"changes": {
"assignment.js": [
{
"span": {
"replace": [
{
"start": [
1,
5
],
"end": [
1,
6
]
},
{
"start": [
1,
5
],
"end": [
1,
6
]
}
]
},
"summary": "Replaced '1' with '0' in an assignment to x"
}
]
},
"errors": {}
},
"filePaths": [
"assignment.js"
],
"patch": [
"diff --git a/assignment.js b/assignment.js",
"index fb4cba4..42e16c6 100644",
"--- a/assignment.js",
"+++ b/assignment.js",
"@@ -1,3 +1,3 @@",
"-x = 1;",
"+x = 0;",
" x = 0;",
" x = 0;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "79ca8610276bd0cc32d257702e20ec268187f1b6..c3da25392def8e82aaf0179cdd8cc51849d805c8"
}
,{
"testCaseDescription": "javascript-assignment-replacement-test",
"expectedResult": {
"changes": {
"assignment.js": [
{
"span": {
"replace": [
{
"start": [
1,
5
],
"end": [
1,
6
]
},
{
"start": [
1,
5
],
"end": [
1,
6
]
}
]
},
"summary": "Replaced '0' with '1' in an assignment to x"
}
]
},
"errors": {}
},
"filePaths": [
"assignment.js"
],
"patch": [
"diff --git a/assignment.js b/assignment.js",
"index 42e16c6..fb4cba4 100644",
"--- a/assignment.js",
"+++ b/assignment.js",
"@@ -1,3 +1,3 @@",
"-x = 0;",
"+x = 1;",
" x = 0;",
" x = 0;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "c3da25392def8e82aaf0179cdd8cc51849d805c8..be4979757f9464e59b4b7fb7dbdce17f4f362029"
}
,{
"testCaseDescription": "javascript-assignment-delete-replacement-test",
"expectedResult": {
"changes": {
"assignment.js": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
6
]
}
},
"summary": "Deleted the 'x' assignment"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
6
]
}
},
"summary": "Deleted the 'x' assignment"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
6
]
}
},
"summary": "Added the 'x' assignment"
}
]
},
"errors": {}
},
"filePaths": [
"assignment.js"
],
"patch": [
"diff --git a/assignment.js b/assignment.js",
"index fb4cba4..11fe15d 100644",
"--- a/assignment.js",
"+++ b/assignment.js",
"@@ -1,3 +1,2 @@",
"-x = 1;",
"-x = 0;",
" x = 0;",
"+x = 1;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "be4979757f9464e59b4b7fb7dbdce17f4f362029..592d4d9a24fe20282bbaa1cf66bbe20959d47ae5"
}
,{
"testCaseDescription": "javascript-assignment-delete-test",
"expectedResult": {
"changes": {
"assignment.js": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
6
]
}
},
"summary": "Deleted the 'x' assignment"
}
]
},
"errors": {}
},
"filePaths": [
"assignment.js"
],
"patch": [
"diff --git a/assignment.js b/assignment.js",
"index 11fe15d..198b8f8 100644",
"--- a/assignment.js",
"+++ b/assignment.js",
"@@ -1,2 +1 @@",
"-x = 0;",
" x = 1;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "592d4d9a24fe20282bbaa1cf66bbe20959d47ae5..f0b77709f5be6c1d671a943d73b8fbb12344762e"
}
,{
"testCaseDescription": "javascript-assignment-delete-rest-test",
"expectedResult": {
"changes": {
"assignment.js": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
6
]
}
},
"summary": "Deleted the 'x' assignment"
}
]
},
"errors": {}
},
"filePaths": [
"assignment.js"
],
"patch": [
"diff --git a/assignment.js b/assignment.js",
"index 198b8f8..e69de29 100644",
"--- a/assignment.js",
"+++ b/assignment.js",
"@@ -1 +0,0 @@",
"-x = 1;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "f0b77709f5be6c1d671a943d73b8fbb12344762e..83f3153b76f49e077237997c965dc6f3c3a159bc"
}]