mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
561 lines
17 KiB
JSON
561 lines
17 KiB
JSON
[{
|
|
"testCaseDescription": "go-grouped-var-declarations-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"grouped-var-declarations.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'zero' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'one' variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"grouped-var-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
|
|
"index e69de29..c1c0b16 100644",
|
|
"--- a/grouped-var-declarations.go",
|
|
"+++ b/grouped-var-declarations.go",
|
|
"@@ -0,0 +1,4 @@",
|
|
"+var (",
|
|
"+zero = 0",
|
|
"+one = 1",
|
|
"+)"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "96f8228635d5aa31ec4bb2a39ffe29e5d20a9025..11eab08288a458f5d015ec5ef2e05fb2b7dea32e"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-grouped-var-declarations-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"grouped-var-declarations.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'b' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
8,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'zero' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
8,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'one' variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"grouped-var-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
|
|
"index c1c0b16..6b9c91d 100644",
|
|
"--- a/grouped-var-declarations.go",
|
|
"+++ b/grouped-var-declarations.go",
|
|
"@@ -1,4 +1,12 @@",
|
|
" var (",
|
|
"+a = 0",
|
|
"+b = 1",
|
|
"+)",
|
|
"+var (",
|
|
"+zero = 0",
|
|
"+one = 1",
|
|
"+)",
|
|
"+var (",
|
|
" zero = 0",
|
|
" one = 1",
|
|
" )"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "11eab08288a458f5d015ec5ef2e05fb2b7dea32e..62cd537c84b87c0bf1d728a2ca8573252e199651"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-grouped-var-declarations-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"grouped-var-declarations.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
2
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
5
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'a' identifier with the 'zero' identifier in the zero variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
2
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
4
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'b' identifier with the 'one' identifier in the one variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"grouped-var-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
|
|
"index 6b9c91d..5ed0e06 100644",
|
|
"--- a/grouped-var-declarations.go",
|
|
"+++ b/grouped-var-declarations.go",
|
|
"@@ -1,6 +1,6 @@",
|
|
" var (",
|
|
"-a = 0",
|
|
"-b = 1",
|
|
"+zero = 0",
|
|
"+one = 1",
|
|
" )",
|
|
" var (",
|
|
" zero = 0"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "62cd537c84b87c0bf1d728a2ca8573252e199651..374b70af8c432f3b501b2f766e4357742719666f"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-grouped-var-declarations-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"grouped-var-declarations.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
5
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
2
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'zero' identifier with the 'a' identifier in the a variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
4
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
2
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'one' identifier with the 'b' identifier in the b variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"grouped-var-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
|
|
"index 5ed0e06..6b9c91d 100644",
|
|
"--- a/grouped-var-declarations.go",
|
|
"+++ b/grouped-var-declarations.go",
|
|
"@@ -1,6 +1,6 @@",
|
|
" var (",
|
|
"-zero = 0",
|
|
"-one = 1",
|
|
"+a = 0",
|
|
"+b = 1",
|
|
" )",
|
|
" var (",
|
|
" zero = 0"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "374b70af8c432f3b501b2f766e4357742719666f..6798fe52d336b34f4a2a4dbb3fc55f1a6475f405"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-grouped-var-declarations-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"grouped-var-declarations.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'b' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
8,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'zero' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
8,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'one' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
8,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
8,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'b' variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"grouped-var-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
|
|
"index 6b9c91d..9094e82 100644",
|
|
"--- a/grouped-var-declarations.go",
|
|
"+++ b/grouped-var-declarations.go",
|
|
"@@ -1,12 +1,8 @@",
|
|
" var (",
|
|
"-a = 0",
|
|
"-b = 1",
|
|
"-)",
|
|
"-var (",
|
|
" zero = 0",
|
|
" one = 1",
|
|
" )",
|
|
" var (",
|
|
"-zero = 0",
|
|
"-one = 1",
|
|
"+a = 0",
|
|
"+b = 1",
|
|
" )"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "6798fe52d336b34f4a2a4dbb3fc55f1a6475f405..56d2bd2464b08e3ea82cb227be949807c420d72c"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-grouped-var-declarations-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"grouped-var-declarations.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'zero' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'one' variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"grouped-var-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
|
|
"index 9094e82..d954576 100644",
|
|
"--- a/grouped-var-declarations.go",
|
|
"+++ b/grouped-var-declarations.go",
|
|
"@@ -1,8 +1,4 @@",
|
|
" var (",
|
|
"-zero = 0",
|
|
"-one = 1",
|
|
"-)",
|
|
"-var (",
|
|
" a = 0",
|
|
" b = 1",
|
|
" )"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "56d2bd2464b08e3ea82cb227be949807c420d72c..a58f71f271671132df6faacafda3f89e67d7cb07"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-grouped-var-declarations-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"grouped-var-declarations.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'b' variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"grouped-var-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
|
|
"index d954576..e69de29 100644",
|
|
"--- a/grouped-var-declarations.go",
|
|
"+++ b/grouped-var-declarations.go",
|
|
"@@ -1,4 +0,0 @@",
|
|
"-var (",
|
|
"-a = 0",
|
|
"-b = 1",
|
|
"-)"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "a58f71f271671132df6faacafda3f89e67d7cb07..ae785157f7fe1383ac01d528a3789e18ae4668c5"
|
|
}]
|