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

287 lines
8.3 KiB
JSON
Raw Normal View History

2017-01-11 00:21:35 +03:00
[{
"testCaseDescription": "go-case-statements-setup-test",
"expectedResult": {
"changes": {
"case-statements.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
13
2017-01-11 00:21:35 +03:00
]
}
},
"summary": "Added the 'main' module"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
5,
2
]
}
},
"summary": "Added the 'main' function"
2017-01-11 00:21:35 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"case-statements.go"
],
"patch": [
"diff --git a/case-statements.go b/case-statements.go",
2017-01-17 23:26:07 +03:00
"index e69de29b..79058077 100644",
2017-01-11 00:21:35 +03:00
"--- a/case-statements.go",
"+++ b/case-statements.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
2017-01-26 04:27:46 +03:00
"shas": "3355a02b6fac9d247cf99f43881fb5175190792a..b2c5307c74079339da797af7cb704f7abe182b87"
2017-01-11 00:21:35 +03:00
}
,{
"testCaseDescription": "go-case-statements-insert-test",
"expectedResult": {
"changes": {
"case-statements.go": [
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
11
]
}
},
"summary": "Added a switch statement in the main function"
2017-01-11 00:21:35 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"case-statements.go"
],
"patch": [
"diff --git a/case-statements.go b/case-statements.go",
2017-01-17 23:26:07 +03:00
"index 79058077..0b4c9561 100644",
2017-01-11 00:21:35 +03:00
"--- a/case-statements.go",
"+++ b/case-statements.go",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-",
"+switch { }",
" }"
],
"gitDir": "test/corpus/repos/go",
2017-01-26 04:27:46 +03:00
"shas": "b2c5307c74079339da797af7cb704f7abe182b87..fab32768031a1be51b8f8ccd970a3b4b5d5f163d"
2017-01-11 00:21:35 +03:00
}
,{
"testCaseDescription": "go-case-statements-replacement-test",
"expectedResult": {
"changes": {
"case-statements.go": [
{
"span": {
"insert": {
"start": [
4,
10
2017-01-11 00:21:35 +03:00
],
"end": [
4,
24
2017-01-11 00:21:35 +03:00
]
}
},
"summary": "Added the 'case foo' case statement in a switch statement of the 'main' function"
2017-01-11 00:21:35 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"case-statements.go"
],
"patch": [
"diff --git a/case-statements.go b/case-statements.go",
2017-01-17 23:26:07 +03:00
"index 0b4c9561..27b70908 100644",
2017-01-11 00:21:35 +03:00
"--- a/case-statements.go",
"+++ b/case-statements.go",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-switch { }",
"+switch { case foo: f1() }",
" }"
],
"gitDir": "test/corpus/repos/go",
2017-01-26 04:27:46 +03:00
"shas": "fab32768031a1be51b8f8ccd970a3b4b5d5f163d..33c9cd81f0e73733862434b833c3913aa305100b"
2017-01-11 00:21:35 +03:00
}
,{
"testCaseDescription": "go-case-statements-delete-replacement-test",
"expectedResult": {
"changes": {
"case-statements.go": [
{
"span": {
"delete": {
"start": [
4,
10
2017-01-11 00:21:35 +03:00
],
"end": [
4,
24
2017-01-11 00:21:35 +03:00
]
}
},
"summary": "Deleted the 'case foo' case statement in a switch statement of the 'main' function"
2017-01-11 00:21:35 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"case-statements.go"
],
"patch": [
"diff --git a/case-statements.go b/case-statements.go",
2017-01-17 23:26:07 +03:00
"index 27b70908..0b4c9561 100644",
2017-01-11 00:21:35 +03:00
"--- a/case-statements.go",
"+++ b/case-statements.go",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-switch { case foo: f1() }",
"+switch { }",
" }"
],
"gitDir": "test/corpus/repos/go",
2017-01-26 04:27:46 +03:00
"shas": "33c9cd81f0e73733862434b833c3913aa305100b..8d768c99fe55cabbc76a2500d292ac765f2a588b"
2017-01-11 00:21:35 +03:00
}
,{
"testCaseDescription": "go-case-statements-delete-insert-test",
"expectedResult": {
"changes": {
"case-statements.go": [
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
11
]
}
},
"summary": "Deleted a switch statement in the main function"
2017-01-11 00:21:35 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"case-statements.go"
],
"patch": [
"diff --git a/case-statements.go b/case-statements.go",
2017-01-17 23:26:07 +03:00
"index 0b4c9561..79058077 100644",
2017-01-11 00:21:35 +03:00
"--- a/case-statements.go",
"+++ b/case-statements.go",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-switch { }",
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
2017-01-26 04:27:46 +03:00
"shas": "8d768c99fe55cabbc76a2500d292ac765f2a588b..3645d31121270fe6f4bcf20176eb24146dff5441"
2017-01-11 00:21:35 +03:00
}
,{
"testCaseDescription": "go-case-statements-teardown-test",
"expectedResult": {
"changes": {
"case-statements.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
13
2017-01-11 00:21:35 +03:00
]
}
},
"summary": "Deleted the 'main' module"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
5,
2
]
}
},
"summary": "Deleted the 'main' function"
2017-01-11 00:21:35 +03:00
}
]
},
"errors": {}
},
"filePaths": [
"case-statements.go"
],
"patch": [
"diff --git a/case-statements.go b/case-statements.go",
2017-01-17 23:26:07 +03:00
"index 79058077..e69de29b 100644",
2017-01-11 00:21:35 +03:00
"--- a/case-statements.go",
"+++ b/case-statements.go",
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
2017-01-26 04:27:46 +03:00
"shas": "3645d31121270fe6f4bcf20176eb24146dff5441..5b27f7604f5afe880e3b2f27953fc19a1462f812"
2017-01-11 00:21:35 +03:00
}]