1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 14:54:16 +03:00
semantic/test/corpus/diff-summaries/javascript/identifier.json

348 lines
10 KiB
JSON
Raw Normal View History

2016-10-11 18:12:20 +03:00
[{
"testCaseDescription": "javascript-identifier-insert-test",
"expectedResult": {
"changes": {
"identifier.js": [
{
"span": {
2016-10-11 18:54:47 +03:00
"insert": {
2016-10-11 18:12:20 +03:00
"start": [
1,
1
],
"end": [
1,
7
]
}
},
2016-10-11 23:17:34 +03:00
"summary": "Added the 'theVar' identifier"
2016-10-11 18:12:20 +03:00
}
]
},
"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;"
],
2016-10-11 18:12:20 +03:00
"gitDir": "test/corpus/repos/javascript",
"shas": "2642fef686808ac2a6c5edde323e87257f4f2983..369e63ae9927770fe9ca2fd662ca648e43ab72e5"
2016-10-11 18:12:20 +03:00
}
,{
"testCaseDescription": "javascript-identifier-replacement-insert-test",
"expectedResult": {
"changes": {
"identifier.js": [
{
"span": {
2016-10-11 18:54:47 +03:00
"insert": {
2016-10-11 18:12:20 +03:00
"start": [
1,
1
],
"end": [
1,
8
]
}
},
2016-10-11 23:17:34 +03:00
"summary": "Added the 'theVar2' identifier"
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,
7
]
}
},
2016-10-11 23:17:34 +03:00
"summary": "Added the 'theVar' identifier"
2016-10-11 18:12:20 +03:00
}
]
},
"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;"
],
2016-10-11 18:12:20 +03:00
"gitDir": "test/corpus/repos/javascript",
"shas": "369e63ae9927770fe9ca2fd662ca648e43ab72e5..ee416c16400890b8f6351b1c8113657cb7671eb7"
2016-10-11 18:12:20 +03:00
}
,{
"testCaseDescription": "javascript-identifier-delete-insert-test",
"expectedResult": {
"changes": {
"identifier.js": [
{
"span": {
2016-10-11 18:54:47 +03:00
"replace": [
2016-10-11 18:12:20 +03:00
{
"start": [
1,
1
],
"end": [
1,
8
]
},
{
"start": [
1,
1
],
"end": [
1,
7
]
}
]
},
2016-10-11 23:17:34 +03:00
"summary": "Replaced the 'theVar2' identifier with the 'theVar' identifier"
2016-10-11 18:12:20 +03:00
}
]
},
"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;"
],
2016-10-11 18:12:20 +03:00
"gitDir": "test/corpus/repos/javascript",
"shas": "ee416c16400890b8f6351b1c8113657cb7671eb7..13d808ca205317e4c1b13c036517ed17cdde1da3"
2016-10-11 18:12:20 +03:00
}
,{
"testCaseDescription": "javascript-identifier-replacement-test",
"expectedResult": {
"changes": {
"identifier.js": [
{
"span": {
2016-10-11 18:54:47 +03:00
"replace": [
2016-10-11 18:12:20 +03:00
{
"start": [
1,
1
],
"end": [
1,
7
]
},
{
"start": [
1,
1
],
"end": [
1,
8
]
}
]
},
2016-10-11 23:17:34 +03:00
"summary": "Replaced the 'theVar' identifier with the 'theVar2' identifier"
2016-10-11 18:12:20 +03:00
}
]
},
"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;"
],
2016-10-11 18:12:20 +03:00
"gitDir": "test/corpus/repos/javascript",
"shas": "13d808ca205317e4c1b13c036517ed17cdde1da3..1f1988b798d7bd2558d1d050b242ef4afbd52629"
2016-10-11 18:12:20 +03:00
}
,{
"testCaseDescription": "javascript-identifier-delete-replacement-test",
"expectedResult": {
"changes": {
"identifier.js": [
{
"span": {
2016-10-11 18:54:47 +03:00
"delete": {
2016-10-11 18:12:20 +03:00
"start": [
1,
1
],
"end": [
1,
8
]
}
},
2016-10-11 23:17:34 +03:00
"summary": "Deleted the 'theVar2' identifier"
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,
7
]
}
},
2016-10-11 23:17:34 +03:00
"summary": "Deleted the 'theVar' identifier"
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,
8
]
}
},
2016-10-11 23:17:34 +03:00
"summary": "Added the 'theVar2' identifier"
2016-10-11 18:12:20 +03:00
}
]
},
"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"
],
2016-10-11 18:12:20 +03:00
"gitDir": "test/corpus/repos/javascript",
"shas": "1f1988b798d7bd2558d1d050b242ef4afbd52629..6408b95d2773e060ccc2c624b319447b326c8a51"
2016-10-11 18:12:20 +03:00
}
,{
"testCaseDescription": "javascript-identifier-delete-test",
"expectedResult": {
"changes": {
"identifier.js": [
{
"span": {
2016-10-11 18:54:47 +03:00
"delete": {
2016-10-11 18:12:20 +03:00
"start": [
1,
1
],
"end": [
1,
7
]
}
},
2016-10-11 23:17:34 +03:00
"summary": "Deleted the 'theVar' identifier"
2016-10-11 18:12:20 +03:00
}
]
},
"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"
],
2016-10-11 18:12:20 +03:00
"gitDir": "test/corpus/repos/javascript",
"shas": "6408b95d2773e060ccc2c624b319447b326c8a51..011d19e2d6ea45758e3df50809069437b44911b5"
2016-10-11 18:12:20 +03:00
}
,{
"testCaseDescription": "javascript-identifier-delete-rest-test",
"expectedResult": {
"changes": {
"identifier.js": [
{
"span": {
2016-10-11 18:54:47 +03:00
"delete": {
2016-10-11 18:12:20 +03:00
"start": [
1,
1
],
"end": [
1,
8
]
}
},
2016-10-11 23:17:34 +03:00
"summary": "Deleted the 'theVar2' identifier"
2016-10-11 18:12:20 +03:00
}
]
},
"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"
],
2016-10-11 18:12:20 +03:00
"gitDir": "test/corpus/repos/javascript",
"shas": "011d19e2d6ea45758e3df50809069437b44911b5..5180fa74c7ae39b3c2cb94b9b5498307af385e5c"
2016-10-11 18:12:20 +03:00
}]