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-17 17:31:09 -05:00

617 lines
20 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": "b2c56ccce1c96d1860ba41249e3a7fb1ce2f916a..7cd15d0ad0cd139504bfcb65557b711246e06d18"
}
,{
"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": "7cd15d0ad0cd139504bfcb65557b711246e06d18..73232e970a8dce969655c390d10ab221cfeccd80"
}
,{
"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": {
"insert": {
"start": [
6,
1
],
"end": [
6,
7
]
}
},
"summary": "Added the 'z' var assignment in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
7,
1
],
"end": [
7,
7
]
}
},
"summary": "Added the 'h' 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..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": "73232e970a8dce969655c390d10ab221cfeccd80..b9340f0913b6da493b23619007294b55696a6d69"
}
,{
"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": {
"insert": {
"start": [
6,
1
],
"end": [
6,
7
]
}
},
"summary": "Added the 'd' var assignment in the main function of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
6,
1
],
"end": [
6,
2
]
},
{
"start": [
7,
1
],
"end": [
7,
2
]
}
]
},
"summary": "Replaced the 'z' identifier with the 'e' identifier in the e var assignment of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
6,
6
],
"end": [
6,
7
]
},
{
"start": [
7,
6
],
"end": [
7,
7
]
}
]
},
"summary": "Replaced '3' with '1' in the e var assignment of the 'main' function"
},
{
"span": {
"delete": {
"start": [
7,
1
],
"end": [
7,
7
]
}
},
"summary": "Deleted the 'h' 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 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": "b9340f0913b6da493b23619007294b55696a6d69..d60b342a59f1738d6c70328b0565e4161cd7f69c"
}
,{
"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": "d60b342a59f1738d6c70328b0565e4161cd7f69c..c0ef1e9e998148153c37afd132e23dd6b74ab1b2"
}
,{
"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": "c0ef1e9e998148153c37afd132e23dd6b74ab1b2..fbd3805851a4e4b50422a0dd3e85d6146355e97c"
}]