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/assignment-statements.json
2016-12-01 16:03:52 -05:00

581 lines
19 KiB
JSON

[{
"testCaseDescription": "go-assignment-statements-setup-test",
"expectedResult": {
"changes": {
"assignment-statements.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"assignment-statements.go"
],
"patch": [
"diff --git a/assignment-statements.go b/assignment-statements.go",
"index e69de29..7905807 100644",
"--- a/assignment-statements.go",
"+++ b/assignment-statements.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "7cd1bf5d5180a287a62fb85bc8e7b34cfc132159..338293e927456ff10caaeccf35e1da6e9074966b"
}
,{
"testCaseDescription": "go-assignment-statements-insert-test",
"expectedResult": {
"changes": {
"assignment-statements.go": [
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
6
]
}
},
"summary": "Added the 'a' assignment in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
5,
13
]
}
},
"summary": "Added the 'b' assignment in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
5,
13
]
}
},
"summary": "Added the 'c' assignment in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
6,
1
],
"end": [
6,
7
]
}
},
"summary": "Added the 'd' assignment in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
7,
1
],
"end": [
7,
7
]
}
},
"summary": "Added the 'e' assignment in the main function of the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"assignment-statements.go"
],
"patch": [
"diff --git a/assignment-statements.go b/assignment-statements.go",
"index 7905807..072782b 100644",
"--- a/assignment-statements.go",
"+++ b/assignment-statements.go",
"@@ -1,5 +1,8 @@",
" package main",
" ",
" func main() {",
"-",
"+a = 1",
"+b, c += 2, 3",
"+d *= 3",
"+e += 1",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "338293e927456ff10caaeccf35e1da6e9074966b..9adf4eb965fc5a4f839a575dec0c698c9478dae2"
}
,{
"testCaseDescription": "go-assignment-statements-replacement-test",
"expectedResult": {
"changes": {
"assignment-statements.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 an assignment to x of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
5,
1
],
"end": [
5,
2
]
},
{
"start": [
5,
1
],
"end": [
5,
2
]
}
]
},
"summary": "Replaced the 'b' identifier with the 'y' identifier in an assignment to y of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
6,
1
],
"end": [
6,
2
]
},
{
"start": [
6,
1
],
"end": [
6,
2
]
}
]
},
"summary": "Replaced the 'd' identifier with the 'z' identifier in an assignment to z of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
7,
1
],
"end": [
7,
2
]
},
{
"start": [
7,
1
],
"end": [
7,
2
]
}
]
},
"summary": "Replaced the 'e' identifier with the 'h' identifier in an assignment to h of the 'main' function"
}
]
},
"errors": {}
},
"filePaths": [
"assignment-statements.go"
],
"patch": [
"diff --git a/assignment-statements.go b/assignment-statements.go",
"index 072782b..2e6b444 100644",
"--- a/assignment-statements.go",
"+++ b/assignment-statements.go",
"@@ -1,8 +1,8 @@",
" package main",
" ",
" func main() {",
"-a = 1",
"-b, c += 2, 3",
"-d *= 3",
"-e += 1",
"+x = 1",
"+y, c += 2, 3",
"+z *= 3",
"+h += 1",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "9adf4eb965fc5a4f839a575dec0c698c9478dae2..1a92a7229a36cf36fd22f02dc5d2dd0613aa495d"
}
,{
"testCaseDescription": "go-assignment-statements-delete-replacement-test",
"expectedResult": {
"changes": {
"assignment-statements.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 an assignment to a of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
5,
1
],
"end": [
5,
2
]
},
{
"start": [
5,
1
],
"end": [
5,
2
]
}
]
},
"summary": "Replaced the 'y' identifier with the 'b' identifier in an assignment to b of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
6,
1
],
"end": [
6,
2
]
},
{
"start": [
6,
1
],
"end": [
6,
2
]
}
]
},
"summary": "Replaced the 'z' identifier with the 'd' identifier in an assignment to d of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
7,
1
],
"end": [
7,
2
]
},
{
"start": [
7,
1
],
"end": [
7,
2
]
}
]
},
"summary": "Replaced the 'h' identifier with the 'e' identifier in an assignment to e of the 'main' function"
}
]
},
"errors": {}
},
"filePaths": [
"assignment-statements.go"
],
"patch": [
"diff --git a/assignment-statements.go b/assignment-statements.go",
"index 2e6b444..072782b 100644",
"--- a/assignment-statements.go",
"+++ b/assignment-statements.go",
"@@ -1,8 +1,8 @@",
" package main",
" ",
" func main() {",
"-x = 1",
"-y, c += 2, 3",
"-z *= 3",
"-h += 1",
"+a = 1",
"+b, c += 2, 3",
"+d *= 3",
"+e += 1",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "1a92a7229a36cf36fd22f02dc5d2dd0613aa495d..0435629b1eadc082e6980d10a4300a4dcf6248b7"
}
,{
"testCaseDescription": "go-assignment-statements-delete-insert-test",
"expectedResult": {
"changes": {
"assignment-statements.go": [
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
6
]
}
},
"summary": "Deleted the 'a' assignment in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
5,
13
]
}
},
"summary": "Deleted the 'b' assignment in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
5,
13
]
}
},
"summary": "Deleted the 'c' assignment in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
6,
1
],
"end": [
6,
7
]
}
},
"summary": "Deleted the 'd' assignment in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
7,
1
],
"end": [
7,
7
]
}
},
"summary": "Deleted the 'e' assignment in the main function of the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"assignment-statements.go"
],
"patch": [
"diff --git a/assignment-statements.go b/assignment-statements.go",
"index 072782b..7905807 100644",
"--- a/assignment-statements.go",
"+++ b/assignment-statements.go",
"@@ -1,8 +1,5 @@",
" package main",
" ",
" func main() {",
"-a = 1",
"-b, c += 2, 3",
"-d *= 3",
"-e += 1",
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "0435629b1eadc082e6980d10a4300a4dcf6248b7..954867170f8a700b8867e0ee9ab363da87855b64"
}
,{
"testCaseDescription": "go-assignment-statements-teardown-test",
"expectedResult": {
"changes": {
"assignment-statements.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Deleted the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"assignment-statements.go"
],
"patch": [
"diff --git a/assignment-statements.go b/assignment-statements.go",
"index 7905807..e69de29 100644",
"--- a/assignment-statements.go",
"+++ b/assignment-statements.go",
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "954867170f8a700b8867e0ee9ab363da87855b64..98a6dc74cc5a66c1d0c8f0d36bd0e08d21121e35"
}]