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/single-import-declarations.json
2016-12-07 13:26:31 -05:00

581 lines
20 KiB
JSON

[{
"testCaseDescription": "go-single-import-declarations-setup-test",
"expectedResult": {
"changes": {
"single-import-declarations.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"single-import-declarations.go"
],
"patch": [
"diff --git a/single-import-declarations.go b/single-import-declarations.go",
"index e69de29..7905807 100644",
"--- a/single-import-declarations.go",
"+++ b/single-import-declarations.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "0c22b7aa63a02fe2ddea7a2e3531e1bf778729a1..5d69d9a37942c78e0d473ad1e812179d949c3fb2"
}
,{
"testCaseDescription": "go-single-import-declarations-insert-test",
"expectedResult": {
"changes": {
"single-import-declarations.go": [
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
7
]
}
},
"summary": "Added the 'import' identifier in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
4,
8
],
"end": [
4,
18
]
}
},
"summary": "Added the \"net/http\" string in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
5,
7
]
}
},
"summary": "Added the 'import' identifier in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
5,
10
],
"end": [
5,
20
]
}
},
"summary": "Added the \"some/dsl\" string in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
6,
1
],
"end": [
6,
7
]
}
},
"summary": "Added the 'import' identifier in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
6,
8
],
"end": [
6,
13
]
}
},
"summary": "Added the 'alias' identifier in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
6,
14
],
"end": [
6,
28
]
}
},
"summary": "Added the \"some/package\" string in the main function of the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"single-import-declarations.go"
],
"patch": [
"diff --git a/single-import-declarations.go b/single-import-declarations.go",
"index 7905807..bf7f515 100644",
"--- a/single-import-declarations.go",
"+++ b/single-import-declarations.go",
"@@ -1,5 +1,7 @@",
" package main",
" ",
" func main() {",
"-",
"+import \"net/http\"",
"+import . \"some/dsl\"",
"+import alias \"some/package\"",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "5d69d9a37942c78e0d473ad1e812179d949c3fb2..2ca878727e617321454f170e913d025e99df5820"
}
,{
"testCaseDescription": "go-single-import-declarations-replacement-test",
"expectedResult": {
"changes": {
"single-import-declarations.go": [
{
"span": {
"replace": [
{
"start": [
4,
8
],
"end": [
4,
18
]
},
{
"start": [
4,
8
],
"end": [
4,
17
]
}
]
},
"summary": "Replaced the \"net/http\" string with the \"foo/bar\" string in the main function of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
5,
10
],
"end": [
5,
20
]
},
{
"start": [
5,
10
],
"end": [
5,
21
]
}
]
},
"summary": "Replaced the \"some/dsl\" string with the \"types/dsl\" string in the main function of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
6,
14
],
"end": [
6,
28
]
},
{
"start": [
6,
14
],
"end": [
6,
32
]
}
]
},
"summary": "Replaced the \"some/package\" string with the \"awesome/packages\" string in the main function of the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"single-import-declarations.go"
],
"patch": [
"diff --git a/single-import-declarations.go b/single-import-declarations.go",
"index bf7f515..7710f5e 100644",
"--- a/single-import-declarations.go",
"+++ b/single-import-declarations.go",
"@@ -1,7 +1,7 @@",
" package main",
" ",
" func main() {",
"-import \"net/http\"",
"-import . \"some/dsl\"",
"-import alias \"some/package\"",
"+import \"foo/bar\"",
"+import . \"types/dsl\"",
"+import alias \"awesome/packages\"",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "2ca878727e617321454f170e913d025e99df5820..b7530d600971732b57e654e06230a52596506f1b"
}
,{
"testCaseDescription": "go-single-import-declarations-delete-replacement-test",
"expectedResult": {
"changes": {
"single-import-declarations.go": [
{
"span": {
"replace": [
{
"start": [
4,
8
],
"end": [
4,
17
]
},
{
"start": [
4,
8
],
"end": [
4,
18
]
}
]
},
"summary": "Replaced the \"foo/bar\" string with the \"net/http\" string in the main function of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
5,
10
],
"end": [
5,
21
]
},
{
"start": [
5,
10
],
"end": [
5,
20
]
}
]
},
"summary": "Replaced the \"types/dsl\" string with the \"some/dsl\" string in the main function of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
6,
14
],
"end": [
6,
32
]
},
{
"start": [
6,
14
],
"end": [
6,
28
]
}
]
},
"summary": "Replaced the \"awesome/packages\" string with the \"some/package\" string in the main function of the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"single-import-declarations.go"
],
"patch": [
"diff --git a/single-import-declarations.go b/single-import-declarations.go",
"index 7710f5e..bf7f515 100644",
"--- a/single-import-declarations.go",
"+++ b/single-import-declarations.go",
"@@ -1,7 +1,7 @@",
" package main",
" ",
" func main() {",
"-import \"foo/bar\"",
"-import . \"types/dsl\"",
"-import alias \"awesome/packages\"",
"+import \"net/http\"",
"+import . \"some/dsl\"",
"+import alias \"some/package\"",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "b7530d600971732b57e654e06230a52596506f1b..4a63cc286af49514ddc57efe336a2e946d6f99e1"
}
,{
"testCaseDescription": "go-single-import-declarations-delete-insert-test",
"expectedResult": {
"changes": {
"single-import-declarations.go": [
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
7
]
}
},
"summary": "Deleted the 'import' identifier in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
4,
8
],
"end": [
4,
18
]
}
},
"summary": "Deleted the \"net/http\" string in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
5,
7
]
}
},
"summary": "Deleted the 'import' identifier in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
5,
10
],
"end": [
5,
20
]
}
},
"summary": "Deleted the \"some/dsl\" string in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
6,
1
],
"end": [
6,
7
]
}
},
"summary": "Deleted the 'import' identifier in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
6,
8
],
"end": [
6,
13
]
}
},
"summary": "Deleted the 'alias' identifier in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
6,
14
],
"end": [
6,
28
]
}
},
"summary": "Deleted the \"some/package\" string in the main function of the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"single-import-declarations.go"
],
"patch": [
"diff --git a/single-import-declarations.go b/single-import-declarations.go",
"index bf7f515..7905807 100644",
"--- a/single-import-declarations.go",
"+++ b/single-import-declarations.go",
"@@ -1,7 +1,5 @@",
" package main",
" ",
" func main() {",
"-import \"net/http\"",
"-import . \"some/dsl\"",
"-import alias \"some/package\"",
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "4a63cc286af49514ddc57efe336a2e946d6f99e1..da47c237665581e5cc2ebdeccd6ee56277a6cbe0"
}
,{
"testCaseDescription": "go-single-import-declarations-teardown-test",
"expectedResult": {
"changes": {
"single-import-declarations.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Deleted the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"single-import-declarations.go"
],
"patch": [
"diff --git a/single-import-declarations.go b/single-import-declarations.go",
"index 7905807..e69de29 100644",
"--- a/single-import-declarations.go",
"+++ b/single-import-declarations.go",
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "da47c237665581e5cc2ebdeccd6ee56277a6cbe0..ef65ae63179c0f5e82869cb8350ac36198dedad8"
}]