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/send-statements.json

365 lines
11 KiB
JSON

[{
"testCaseDescription": "go-send-statements-setup-test",
"expectedResult": {
"changes": {
"send-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": [
"send-statements.go"
],
"patch": [
"diff --git a/send-statements.go b/send-statements.go",
"index e69de29b..79058077 100644",
"--- a/send-statements.go",
"+++ b/send-statements.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "e60727463ba52abd72de1632ff175c1ac7bbcfc7..ed1e02c136d6e9a043daa9ee12e81e150d1fc545"
}
,{
"testCaseDescription": "go-send-statements-insert-test",
"expectedResult": {
"changes": {
"send-statements.go": [
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
9
]
}
},
"summary": "Added the 'foo <- 5' send statement in the main function"
}
]
},
"errors": {}
},
"filePaths": [
"send-statements.go"
],
"patch": [
"diff --git a/send-statements.go b/send-statements.go",
"index 79058077..5f327d16 100644",
"--- a/send-statements.go",
"+++ b/send-statements.go",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-",
"+foo <- 5",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "ed1e02c136d6e9a043daa9ee12e81e150d1fc545..adb50053bcc578e36aac6edc0a9d55862573eaef"
}
,{
"testCaseDescription": "go-send-statements-replacement-test",
"expectedResult": {
"changes": {
"send-statements.go": [
{
"span": {
"replace": [
{
"start": [
4,
1
],
"end": [
4,
4
]
},
{
"start": [
4,
1
],
"end": [
4,
4
]
}
]
},
"summary": "Replaced the 'foo' identifier with the 'bar' identifier in the main function"
},
{
"span": {
"replace": [
{
"start": [
4,
8
],
"end": [
4,
9
]
},
{
"start": [
4,
8
],
"end": [
4,
9
]
}
]
},
"summary": "Replaced '5' with '6' in the main function"
}
]
},
"errors": {}
},
"filePaths": [
"send-statements.go"
],
"patch": [
"diff --git a/send-statements.go b/send-statements.go",
"index 5f327d16..3829478b 100644",
"--- a/send-statements.go",
"+++ b/send-statements.go",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-foo <- 5",
"+bar <- 6",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "adb50053bcc578e36aac6edc0a9d55862573eaef..98f992927b0b696b05605ab87c43ded63997fcba"
}
,{
"testCaseDescription": "go-send-statements-delete-replacement-test",
"expectedResult": {
"changes": {
"send-statements.go": [
{
"span": {
"replace": [
{
"start": [
4,
1
],
"end": [
4,
4
]
},
{
"start": [
4,
1
],
"end": [
4,
4
]
}
]
},
"summary": "Replaced the 'bar' identifier with the 'foo' identifier in the main function"
},
{
"span": {
"replace": [
{
"start": [
4,
8
],
"end": [
4,
9
]
},
{
"start": [
4,
8
],
"end": [
4,
9
]
}
]
},
"summary": "Replaced '6' with '5' in the main function"
}
]
},
"errors": {}
},
"filePaths": [
"send-statements.go"
],
"patch": [
"diff --git a/send-statements.go b/send-statements.go",
"index 3829478b..5f327d16 100644",
"--- a/send-statements.go",
"+++ b/send-statements.go",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-bar <- 6",
"+foo <- 5",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "98f992927b0b696b05605ab87c43ded63997fcba..57cd7e79742a11a961a3350af42c90f4b159656d"
}
,{
"testCaseDescription": "go-send-statements-delete-insert-test",
"expectedResult": {
"changes": {
"send-statements.go": [
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
9
]
}
},
"summary": "Deleted the 'foo <- 5' send statement in the main function"
}
]
},
"errors": {}
},
"filePaths": [
"send-statements.go"
],
"patch": [
"diff --git a/send-statements.go b/send-statements.go",
"index 5f327d16..79058077 100644",
"--- a/send-statements.go",
"+++ b/send-statements.go",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-foo <- 5",
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "57cd7e79742a11a961a3350af42c90f4b159656d..99cfbf6c7cf830e5d37cdf8f845f35387dfb62ef"
}
,{
"testCaseDescription": "go-send-statements-teardown-test",
"expectedResult": {
"changes": {
"send-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": [
"send-statements.go"
],
"patch": [
"diff --git a/send-statements.go b/send-statements.go",
"index 79058077..e69de29b 100644",
"--- a/send-statements.go",
"+++ b/send-statements.go",
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "99cfbf6c7cf830e5d37cdf8f845f35387dfb62ef..fd1c14f767a8a1d8c5e5591a7509dc6861634c14"
}]