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
2017-01-11 16:30:01 -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 e69de29b..79058077 100644",
"--- a/assignment-statements.go",
"+++ b/assignment-statements.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "cabf3ea019a86bbde0184a1df4e78e3bf28aaa58..3e492134f65295ecfe94e63243a74ba271dd3b27"
}
,{
"testCaseDescription": "go-assignment-statements-insert-test",
"expectedResult": {
"changes": {
"assignment-statements.go": [
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
6
]
}
},
"summary": "Added the 'a' var assignment in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
5,
13
]
}
},
"summary": "Added the 'b' var assignment in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
5,
13
]
}
},
"summary": "Added the 'c' var assignment in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
6,
1
],
"end": [
6,
7
]
}
},
"summary": "Added the 'd' var assignment in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
7,
1
],
"end": [
7,
7
]
}
},
"summary": "Added the 'e' var 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 79058077..072782b1 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": "3e492134f65295ecfe94e63243a74ba271dd3b27..16c157af14dc8da8976cb8952faa93e5d68387c8"
}
,{
"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 the x var assignment 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 the y var assignment 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 the z var assignment 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 the h var assignment of the 'main' function"
}
]
},
"errors": {}
},
"filePaths": [
"assignment-statements.go"
],
"patch": [
"diff --git a/assignment-statements.go b/assignment-statements.go",
"index 072782b1..2e6b444c 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": "16c157af14dc8da8976cb8952faa93e5d68387c8..4b129f6e7851ed878f20e50cb3c47387bf3a93bc"
}
,{
"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 the a var assignment 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 the b var assignment 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 the d var assignment 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 the e var assignment of the 'main' function"
}
]
},
"errors": {}
},
"filePaths": [
"assignment-statements.go"
],
"patch": [
"diff --git a/assignment-statements.go b/assignment-statements.go",
"index 2e6b444c..072782b1 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": "4b129f6e7851ed878f20e50cb3c47387bf3a93bc..76edc5698ee2dcae6208f76e7b0286bb741ea7f2"
}
,{
"testCaseDescription": "go-assignment-statements-delete-insert-test",
"expectedResult": {
"changes": {
"assignment-statements.go": [
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
6
]
}
},
"summary": "Deleted the 'a' var assignment in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
5,
13
]
}
},
"summary": "Deleted the 'b' var assignment in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
5,
13
]
}
},
"summary": "Deleted the 'c' var assignment in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
6,
1
],
"end": [
6,
7
]
}
},
"summary": "Deleted the 'd' var assignment in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
7,
1
],
"end": [
7,
7
]
}
},
"summary": "Deleted the 'e' var 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 072782b1..79058077 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": "76edc5698ee2dcae6208f76e7b0286bb741ea7f2..8de621a50174cf6a0db33ccb5e216dcc7f5a5ce5"
}
,{
"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 79058077..e69de29b 100644",
"--- a/assignment-statements.go",
"+++ b/assignment-statements.go",
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "8de621a50174cf6a0db33ccb5e216dcc7f5a5ce5..4ba4df339989c603edb2546aa476d7db31125dc9"
}]