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": "4ed215f22d91e217f11093b1d2228f03502a4b0c..e2049fd58e6e267c9696f3183b4bf06a60fe90fb"
|
|
}
|
|
,{
|
|
"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": "e2049fd58e6e267c9696f3183b4bf06a60fe90fb..453256240bb075ff2da448c26350f7f554305584"
|
|
}
|
|
,{
|
|
"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": "453256240bb075ff2da448c26350f7f554305584..da4c60fc50c1b5a373507fcb334269cea8f10496"
|
|
}
|
|
,{
|
|
"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": "da4c60fc50c1b5a373507fcb334269cea8f10496..2bfe0d327cd6c02d427a2bddd0ba8c7d20738899"
|
|
}
|
|
,{
|
|
"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": "2bfe0d327cd6c02d427a2bddd0ba8c7d20738899..833b27ea088c0be200e050134b181d0e58f68890"
|
|
}
|
|
,{
|
|
"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": "833b27ea088c0be200e050134b181d0e58f68890..434d00ea8e5dfc730940942d7e3817e0b93a492c"
|
|
}
|
|
,{
|
|
"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": "434d00ea8e5dfc730940942d7e3817e0b93a492c..5d413eb064a29e4548cd1e7db3454b914288ee62"
|
|
}]
|