1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 23:11:50 +03:00
semantic/test/corpus/diff-summaries/go/short-var-declarations.json
2017-02-07 11:37:47 -05:00

563 lines
18 KiB
JSON

[{
"testCaseDescription": "go-short-var-declarations-setup-test",
"expectedResult": {
"changes": {
"short-var-declarations.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
13
]
}
},
"summary": "Added the 'main' module"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
5,
2
]
}
},
"summary": "Added the 'main' function"
}
]
},
"errors": {}
},
"filePaths": [
"short-var-declarations.go"
],
"patch": [
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
"index e69de29b..79058077 100644",
"--- a/short-var-declarations.go",
"+++ b/short-var-declarations.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "1f7119ceb53f8159ac2330bdb3c78e76a19a5ed0..a2e7c4375e7fc045b6a99635256eabab7fa6b622"
}
,{
"testCaseDescription": "go-short-var-declarations-insert-test",
"expectedResult": {
"changes": {
"short-var-declarations.go": [
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
2
]
}
},
"summary": "Added the 'a' identifier in the main function"
},
{
"span": {
"insert": {
"start": [
4,
4
],
"end": [
4,
5
]
}
},
"summary": "Added the 'b' identifier in the main function"
},
{
"span": {
"insert": {
"start": [
4,
9
],
"end": [
4,
10
]
}
},
"summary": "Added '1' in the main function"
},
{
"span": {
"insert": {
"start": [
4,
12
],
"end": [
4,
13
]
}
},
"summary": "Added '2' in the main function"
}
]
},
"errors": {}
},
"filePaths": [
"short-var-declarations.go"
],
"patch": [
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
"index 79058077..4ca1ce37 100644",
"--- a/short-var-declarations.go",
"+++ b/short-var-declarations.go",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-",
"+a, b := 1, 2",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "a2e7c4375e7fc045b6a99635256eabab7fa6b622..b139d1556c66800c51df4d0dbd144853e2ca4b7d"
}
,{
"testCaseDescription": "go-short-var-declarations-replacement-test",
"expectedResult": {
"changes": {
"short-var-declarations.go": [
{
"span": {
"replace": [
{
"start": [
4,
1
],
"end": [
4,
2
]
},
{
"start": [
4,
1
],
"end": [
4,
2
]
}
]
},
"summary": "Replaced the 'a' identifier with the 'x' identifier in the main function"
},
{
"span": {
"replace": [
{
"start": [
4,
4
],
"end": [
4,
5
]
},
{
"start": [
4,
4
],
"end": [
4,
5
]
}
]
},
"summary": "Replaced the 'b' identifier with the 'y' identifier in the main function"
},
{
"span": {
"replace": [
{
"start": [
4,
9
],
"end": [
4,
10
]
},
{
"start": [
4,
9
],
"end": [
4,
10
]
}
]
},
"summary": "Replaced '1' with '3' in the main function"
},
{
"span": {
"replace": [
{
"start": [
4,
12
],
"end": [
4,
13
]
},
{
"start": [
4,
12
],
"end": [
4,
13
]
}
]
},
"summary": "Replaced '2' with '4' in the main function"
}
]
},
"errors": {}
},
"filePaths": [
"short-var-declarations.go"
],
"patch": [
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
"index 4ca1ce37..bbbf9372 100644",
"--- a/short-var-declarations.go",
"+++ b/short-var-declarations.go",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-a, b := 1, 2",
"+x, y := 3, 4",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "b139d1556c66800c51df4d0dbd144853e2ca4b7d..7c16d07d891846d3d1ba2f4af66d03e7562261ad"
}
,{
"testCaseDescription": "go-short-var-declarations-delete-replacement-test",
"expectedResult": {
"changes": {
"short-var-declarations.go": [
{
"span": {
"replace": [
{
"start": [
4,
1
],
"end": [
4,
2
]
},
{
"start": [
4,
1
],
"end": [
4,
2
]
}
]
},
"summary": "Replaced the 'x' identifier with the 'a' identifier in the main function"
},
{
"span": {
"replace": [
{
"start": [
4,
4
],
"end": [
4,
5
]
},
{
"start": [
4,
4
],
"end": [
4,
5
]
}
]
},
"summary": "Replaced the 'y' identifier with the 'b' identifier in the main function"
},
{
"span": {
"replace": [
{
"start": [
4,
9
],
"end": [
4,
10
]
},
{
"start": [
4,
9
],
"end": [
4,
10
]
}
]
},
"summary": "Replaced '3' with '1' in the main function"
},
{
"span": {
"replace": [
{
"start": [
4,
12
],
"end": [
4,
13
]
},
{
"start": [
4,
12
],
"end": [
4,
13
]
}
]
},
"summary": "Replaced '4' with '2' in the main function"
}
]
},
"errors": {}
},
"filePaths": [
"short-var-declarations.go"
],
"patch": [
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
"index bbbf9372..4ca1ce37 100644",
"--- a/short-var-declarations.go",
"+++ b/short-var-declarations.go",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-x, y := 3, 4",
"+a, b := 1, 2",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "7c16d07d891846d3d1ba2f4af66d03e7562261ad..6bdb4bee2e8545c02ec5e1ee43b8db9d9bbe3bcd"
}
,{
"testCaseDescription": "go-short-var-declarations-delete-insert-test",
"expectedResult": {
"changes": {
"short-var-declarations.go": [
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
2
]
}
},
"summary": "Deleted the 'a' identifier in the main function"
},
{
"span": {
"delete": {
"start": [
4,
4
],
"end": [
4,
5
]
}
},
"summary": "Deleted the 'b' identifier in the main function"
},
{
"span": {
"delete": {
"start": [
4,
9
],
"end": [
4,
10
]
}
},
"summary": "Deleted '1' in the main function"
},
{
"span": {
"delete": {
"start": [
4,
12
],
"end": [
4,
13
]
}
},
"summary": "Deleted '2' in the main function"
}
]
},
"errors": {}
},
"filePaths": [
"short-var-declarations.go"
],
"patch": [
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
"index 4ca1ce37..79058077 100644",
"--- a/short-var-declarations.go",
"+++ b/short-var-declarations.go",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-a, b := 1, 2",
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "6bdb4bee2e8545c02ec5e1ee43b8db9d9bbe3bcd..dc4bbc0a8f7d2a0ab806dd181cc75f881d14d9fd"
}
,{
"testCaseDescription": "go-short-var-declarations-teardown-test",
"expectedResult": {
"changes": {
"short-var-declarations.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
13
]
}
},
"summary": "Deleted the 'main' module"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
5,
2
]
}
},
"summary": "Deleted the 'main' function"
}
]
},
"errors": {}
},
"filePaths": [
"short-var-declarations.go"
],
"patch": [
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
"index 79058077..e69de29b 100644",
"--- a/short-var-declarations.go",
"+++ b/short-var-declarations.go",
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "dc4bbc0a8f7d2a0ab806dd181cc75f881d14d9fd..373c46bee0b8179cf5d2f00412173597e503cdd3"
}]