mirror of
https://github.com/github/semantic.git
synced 2024-12-27 00:44:57 +03:00
531 lines
16 KiB
JSON
531 lines
16 KiB
JSON
[{
|
|
"testCaseDescription": "javascript-var-declaration-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"var-declaration.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
5
|
|
],
|
|
"end": [
|
|
1,
|
|
10
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"var-declaration.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/var-declaration.js b/var-declaration.js",
|
|
"index e69de29..b506100 100644",
|
|
"--- a/var-declaration.js",
|
|
"+++ b/var-declaration.js",
|
|
"@@ -0,0 +1 @@",
|
|
"+var x = 1;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "5d2db352ed0e33bb51a7f2330066274984490127..f455ffd086c07cb3e4de74f4da0be7e944d063f7"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-var-declaration-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"var-declaration.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
5
|
|
],
|
|
"end": [
|
|
1,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
8
|
|
],
|
|
"end": [
|
|
1,
|
|
14
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'y' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
16
|
|
],
|
|
"end": [
|
|
1,
|
|
17
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'z' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
5
|
|
],
|
|
"end": [
|
|
2,
|
|
10
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"var-declaration.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/var-declaration.js b/var-declaration.js",
|
|
"index b506100..b08ebfb 100644",
|
|
"--- a/var-declaration.js",
|
|
"+++ b/var-declaration.js",
|
|
"@@ -1 +1,3 @@",
|
|
"+var x, y = {}, z;",
|
|
"+var x = 1;",
|
|
" var x = 1;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "f455ffd086c07cb3e4de74f4da0be7e944d063f7..7c7c53ef609ab1a3f9dd578a6e7b3af487d1a8d6"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-var-declaration-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"var-declaration.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
5
|
|
],
|
|
"end": [
|
|
1,
|
|
10
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
5
|
|
],
|
|
"end": [
|
|
1,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
8
|
|
],
|
|
"end": [
|
|
1,
|
|
14
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'y' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
16
|
|
],
|
|
"end": [
|
|
1,
|
|
17
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'z' variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"var-declaration.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/var-declaration.js b/var-declaration.js",
|
|
"index b08ebfb..adc261e 100644",
|
|
"--- a/var-declaration.js",
|
|
"+++ b/var-declaration.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-var x, y = {}, z;",
|
|
"+var x = 1;",
|
|
" var x = 1;",
|
|
" var x = 1;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "7c7c53ef609ab1a3f9dd578a6e7b3af487d1a8d6..8c51fa18b7b49a6bb22947979e3660da861b8472"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-var-declaration-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"var-declaration.js": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
5
|
|
],
|
|
"end": [
|
|
1,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
5
|
|
],
|
|
"end": [
|
|
1,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
8
|
|
],
|
|
"end": [
|
|
1,
|
|
14
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'x' var assignment with the 'y' var assignment"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
16
|
|
],
|
|
"end": [
|
|
1,
|
|
17
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'z' variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"var-declaration.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/var-declaration.js b/var-declaration.js",
|
|
"index adc261e..b08ebfb 100644",
|
|
"--- a/var-declaration.js",
|
|
"+++ b/var-declaration.js",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-var x = 1;",
|
|
"+var x, y = {}, z;",
|
|
" var x = 1;",
|
|
" var x = 1;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "8c51fa18b7b49a6bb22947979e3660da861b8472..41c866c677aca04b21b600e74d218ccc998d2f5d"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-var-declaration-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"var-declaration.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
5
|
|
],
|
|
"end": [
|
|
1,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
8
|
|
],
|
|
"end": [
|
|
1,
|
|
14
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'y' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
16
|
|
],
|
|
"end": [
|
|
1,
|
|
17
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'z' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
5
|
|
],
|
|
"end": [
|
|
2,
|
|
10
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
5
|
|
],
|
|
"end": [
|
|
2,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
8
|
|
],
|
|
"end": [
|
|
2,
|
|
14
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'y' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
16
|
|
],
|
|
"end": [
|
|
2,
|
|
17
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'z' variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"var-declaration.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/var-declaration.js b/var-declaration.js",
|
|
"index b08ebfb..514f7c4 100644",
|
|
"--- a/var-declaration.js",
|
|
"+++ b/var-declaration.js",
|
|
"@@ -1,3 +1,2 @@",
|
|
"-var x, y = {}, z;",
|
|
"-var x = 1;",
|
|
" var x = 1;",
|
|
"+var x, y = {}, z;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "41c866c677aca04b21b600e74d218ccc998d2f5d..4330d72069a0ee02f257a7a2958054b36255ea3a"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-var-declaration-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"var-declaration.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
5
|
|
],
|
|
"end": [
|
|
1,
|
|
10
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"var-declaration.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/var-declaration.js b/var-declaration.js",
|
|
"index 514f7c4..9fc69e2 100644",
|
|
"--- a/var-declaration.js",
|
|
"+++ b/var-declaration.js",
|
|
"@@ -1,2 +1 @@",
|
|
"-var x = 1;",
|
|
" var x, y = {}, z;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "4330d72069a0ee02f257a7a2958054b36255ea3a..2285435873a4dd3e309e0a9950307823b9f95795"
|
|
}
|
|
,{
|
|
"testCaseDescription": "javascript-var-declaration-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"var-declaration.js": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
5
|
|
],
|
|
"end": [
|
|
1,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
8
|
|
],
|
|
"end": [
|
|
1,
|
|
14
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'y' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
16
|
|
],
|
|
"end": [
|
|
1,
|
|
17
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'z' variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"var-declaration.js"
|
|
],
|
|
"patch": [
|
|
"diff --git a/var-declaration.js b/var-declaration.js",
|
|
"index 9fc69e2..e69de29 100644",
|
|
"--- a/var-declaration.js",
|
|
"+++ b/var-declaration.js",
|
|
"@@ -1 +0,0 @@",
|
|
"-var x, y = {}, z;"
|
|
],
|
|
"gitDir": "test/corpus/repos/javascript",
|
|
"shas": "2285435873a4dd3e309e0a9950307823b9f95795..81bc4513ad3979452e9e95586a5fbc9ca66eeadc"
|
|
}]
|