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/identifier.json
2016-11-03 16:02:56 -07:00

348 lines
10 KiB
JSON

[{
"testCaseDescription": "javascript-identifier-insert-test",
"expectedResult": {
"changes": {
"identifier.js": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
7
]
}
},
"summary": "Added the 'theVar' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"identifier.js"
],
"patch": [
"diff --git a/identifier.js b/identifier.js",
"index e69de29..1cf4ad0 100644",
"--- a/identifier.js",
"+++ b/identifier.js",
"@@ -0,0 +1 @@",
"+theVar;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "2642fef686808ac2a6c5edde323e87257f4f2983..369e63ae9927770fe9ca2fd662ca648e43ab72e5"
}
,{
"testCaseDescription": "javascript-identifier-replacement-insert-test",
"expectedResult": {
"changes": {
"identifier.js": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
8
]
}
},
"summary": "Added the 'theVar2' identifier"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
7
]
}
},
"summary": "Added the 'theVar' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"identifier.js"
],
"patch": [
"diff --git a/identifier.js b/identifier.js",
"index 1cf4ad0..888855a 100644",
"--- a/identifier.js",
"+++ b/identifier.js",
"@@ -1 +1,3 @@",
"+theVar2",
"+theVar;",
" theVar;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "369e63ae9927770fe9ca2fd662ca648e43ab72e5..ee416c16400890b8f6351b1c8113657cb7671eb7"
}
,{
"testCaseDescription": "javascript-identifier-delete-insert-test",
"expectedResult": {
"changes": {
"identifier.js": [
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
8
]
},
{
"start": [
1,
1
],
"end": [
1,
7
]
}
]
},
"summary": "Replaced the 'theVar2' identifier with the 'theVar' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"identifier.js"
],
"patch": [
"diff --git a/identifier.js b/identifier.js",
"index 888855a..60e041c 100644",
"--- a/identifier.js",
"+++ b/identifier.js",
"@@ -1,3 +1,3 @@",
"-theVar2",
"+theVar;",
" theVar;",
" theVar;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "ee416c16400890b8f6351b1c8113657cb7671eb7..13d808ca205317e4c1b13c036517ed17cdde1da3"
}
,{
"testCaseDescription": "javascript-identifier-replacement-test",
"expectedResult": {
"changes": {
"identifier.js": [
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
7
]
},
{
"start": [
1,
1
],
"end": [
1,
8
]
}
]
},
"summary": "Replaced the 'theVar' identifier with the 'theVar2' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"identifier.js"
],
"patch": [
"diff --git a/identifier.js b/identifier.js",
"index 60e041c..888855a 100644",
"--- a/identifier.js",
"+++ b/identifier.js",
"@@ -1,3 +1,3 @@",
"-theVar;",
"+theVar2",
" theVar;",
" theVar;"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "13d808ca205317e4c1b13c036517ed17cdde1da3..1f1988b798d7bd2558d1d050b242ef4afbd52629"
}
,{
"testCaseDescription": "javascript-identifier-delete-replacement-test",
"expectedResult": {
"changes": {
"identifier.js": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
8
]
}
},
"summary": "Deleted the 'theVar2' identifier"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
7
]
}
},
"summary": "Deleted the 'theVar' identifier"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
8
]
}
},
"summary": "Added the 'theVar2' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"identifier.js"
],
"patch": [
"diff --git a/identifier.js b/identifier.js",
"index 888855a..fbc7b28 100644",
"--- a/identifier.js",
"+++ b/identifier.js",
"@@ -1,3 +1,2 @@",
"-theVar2",
"-theVar;",
" theVar;",
"+theVar2"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "1f1988b798d7bd2558d1d050b242ef4afbd52629..6408b95d2773e060ccc2c624b319447b326c8a51"
}
,{
"testCaseDescription": "javascript-identifier-delete-test",
"expectedResult": {
"changes": {
"identifier.js": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
7
]
}
},
"summary": "Deleted the 'theVar' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"identifier.js"
],
"patch": [
"diff --git a/identifier.js b/identifier.js",
"index fbc7b28..7276d95 100644",
"--- a/identifier.js",
"+++ b/identifier.js",
"@@ -1,2 +1 @@",
"-theVar;",
" theVar2"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "6408b95d2773e060ccc2c624b319447b326c8a51..011d19e2d6ea45758e3df50809069437b44911b5"
}
,{
"testCaseDescription": "javascript-identifier-delete-rest-test",
"expectedResult": {
"changes": {
"identifier.js": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
8
]
}
},
"summary": "Deleted the 'theVar2' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"identifier.js"
],
"patch": [
"diff --git a/identifier.js b/identifier.js",
"index 7276d95..e69de29 100644",
"--- a/identifier.js",
"+++ b/identifier.js",
"@@ -1 +0,0 @@",
"-theVar2"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "011d19e2d6ea45758e3df50809069437b44911b5..5180fa74c7ae39b3c2cb94b9b5498307af385e5c"
}]