1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 06:41:45 +03:00
semantic/test/corpus/diff-summaries/go/assignment-statements.json
2017-02-07 11:37:47 -05:00

581 lines
19 KiB
JSON

[{
"testCaseDescription": "go-assignment-statements-setup-test",
"expectedResult": {
"changes": {
"assignment-statements.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": [
"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": "e2c2101dadc49e784ab17192eba4aad3c2c5d13b..79a597ca63c3f7aba661f01ecaa3ec0c909f019d"
}
,{
"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"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
5,
13
]
}
},
"summary": "Added the 'b, c' assignment in the main function"
},
{
"span": {
"insert": {
"start": [
6,
1
],
"end": [
6,
7
]
}
},
"summary": "Added the 'd' assignment in the main function"
},
{
"span": {
"insert": {
"start": [
7,
1
],
"end": [
7,
7
]
}
},
"summary": "Added the 'e' assignment in the main function"
}
]
},
"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": "79a597ca63c3f7aba661f01ecaa3ec0c909f019d..7a3bfc9e5f9f145637904b08f975bf89cfc743c6"
}
,{
"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, c 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 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": "7a3bfc9e5f9f145637904b08f975bf89cfc743c6..55fb8ccd8e99c214fd184281948c01d1fb7ad7d1"
}
,{
"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, c 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 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": "55fb8ccd8e99c214fd184281948c01d1fb7ad7d1..ad10bb2d2952b00ac63e7e3c025cdb8312a931ac"
}
,{
"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"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
5,
13
]
}
},
"summary": "Deleted the 'b, c' assignment in the main function"
},
{
"span": {
"delete": {
"start": [
6,
1
],
"end": [
6,
7
]
}
},
"summary": "Deleted the 'd' assignment in the main function"
},
{
"span": {
"delete": {
"start": [
7,
1
],
"end": [
7,
7
]
}
},
"summary": "Deleted the 'e' assignment in the main function"
}
]
},
"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": "ad10bb2d2952b00ac63e7e3c025cdb8312a931ac..bf0fad2433a6cb884471ee65ed32b0797c855306"
}
,{
"testCaseDescription": "go-assignment-statements-teardown-test",
"expectedResult": {
"changes": {
"assignment-statements.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": [
"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": "bf0fad2433a6cb884471ee65ed32b0797c855306..844563260fa09b99d4cf94ec2ba5a65d9a5e6ded"
}]