1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 14:54:16 +03:00
semantic/test/corpus/diff-summaries/go/grouped-var-declarations.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": "9380edc74c7b6f1536ae7db17c4c3fba7f584669..3b33ea3c36aaad9b64f475e2bb5cdcfcb1d25241"
}
,{
"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": "3b33ea3c36aaad9b64f475e2bb5cdcfcb1d25241..948afd83e9c94af5542c8e356748b0c705bc032a"
}
,{
"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": "948afd83e9c94af5542c8e356748b0c705bc032a..2fabb8dd105e814422752a3e6044452b581ccf38"
}
,{
"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": "2fabb8dd105e814422752a3e6044452b581ccf38..79e29cbc7d1dca8e0e59bac0b3f6d192f59561e4"
}
,{
"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": "79e29cbc7d1dca8e0e59bac0b3f6d192f59561e4..b736520ae0a113dbb8222bd0ebb035ec63561533"
}
,{
"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": "b736520ae0a113dbb8222bd0ebb035ec63561533..a4607d81543ec57ba80385e685e0bbd74160546f"
}
,{
"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": "a4607d81543ec57ba80385e685e0bbd74160546f..9927c14e3d2e47c271d13b8f6c44016114cc6578"
}]