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/modifying-struct-fields.json
2017-02-07 11:37:47 -05:00

347 lines
11 KiB
JSON

[{
"testCaseDescription": "go-modifying-struct-fields-setup-test",
"expectedResult": {
"changes": {
"modifying-struct-fields.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": [
"modifying-struct-fields.go"
],
"patch": [
"diff --git a/modifying-struct-fields.go b/modifying-struct-fields.go",
"index e69de29b..79058077 100644",
"--- a/modifying-struct-fields.go",
"+++ b/modifying-struct-fields.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "8566e6b82b82cdb946f31050cd67e81c7a70a4f8..4c6ba0cec79bc7bc4f19f23ec290129743c33ab0"
}
,{
"testCaseDescription": "go-modifying-struct-fields-insert-test",
"expectedResult": {
"changes": {
"modifying-struct-fields.go": [
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
4
]
}
},
"summary": "Added the 'ctx' identifier in the main function"
},
{
"span": {
"insert": {
"start": [
4,
8
],
"end": [
6,
2
]
}
},
"summary": "Added the '&uploadContext{\n Remote: remote\n}' operator in the main function"
}
]
},
"errors": {}
},
"filePaths": [
"modifying-struct-fields.go"
],
"patch": [
"diff --git a/modifying-struct-fields.go b/modifying-struct-fields.go",
"index 79058077..8b8c10e6 100644",
"--- a/modifying-struct-fields.go",
"+++ b/modifying-struct-fields.go",
"@@ -1,5 +1,7 @@",
" package main",
" ",
" func main() {",
"-",
"+ctx := &uploadContext{",
"+ Remote: remote",
"+}",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "4c6ba0cec79bc7bc4f19f23ec290129743c33ab0..ce4c1df86303fc418b251ee6c3cdb8a5e19c1ddc"
}
,{
"testCaseDescription": "go-modifying-struct-fields-replacement-test",
"expectedResult": {
"changes": {
"modifying-struct-fields.go": [
{
"span": {
"replace": [
{
"start": [
5,
4
],
"end": [
5,
18
]
},
{
"start": [
5,
4
],
"end": [
5,
35
]
}
]
},
"summary": "Replaced the 'Remote: remote' pair with the 'trackedLocksMu: new(sync.Mutex)' pair in the main function"
}
]
},
"errors": {}
},
"filePaths": [
"modifying-struct-fields.go"
],
"patch": [
"diff --git a/modifying-struct-fields.go b/modifying-struct-fields.go",
"index 8b8c10e6..e16cd243 100644",
"--- a/modifying-struct-fields.go",
"+++ b/modifying-struct-fields.go",
"@@ -2,6 +2,6 @@ package main",
" ",
" func main() {",
" ctx := &uploadContext{",
"- Remote: remote",
"+ trackedLocksMu: new(sync.Mutex)",
" }",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "ce4c1df86303fc418b251ee6c3cdb8a5e19c1ddc..914f29c058eacd9c592d304947d46feaa25e7b33"
}
,{
"testCaseDescription": "go-modifying-struct-fields-delete-replacement-test",
"expectedResult": {
"changes": {
"modifying-struct-fields.go": [
{
"span": {
"replace": [
{
"start": [
5,
4
],
"end": [
5,
35
]
},
{
"start": [
5,
4
],
"end": [
5,
18
]
}
]
},
"summary": "Replaced the 'trackedLocksMu: new(sync.Mutex)' pair with the 'Remote: remote' pair in the main function"
}
]
},
"errors": {}
},
"filePaths": [
"modifying-struct-fields.go"
],
"patch": [
"diff --git a/modifying-struct-fields.go b/modifying-struct-fields.go",
"index e16cd243..8b8c10e6 100644",
"--- a/modifying-struct-fields.go",
"+++ b/modifying-struct-fields.go",
"@@ -2,6 +2,6 @@ package main",
" ",
" func main() {",
" ctx := &uploadContext{",
"- trackedLocksMu: new(sync.Mutex)",
"+ Remote: remote",
" }",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "914f29c058eacd9c592d304947d46feaa25e7b33..697657a456eb527a797dcae7f135a1e6d37a3df6"
}
,{
"testCaseDescription": "go-modifying-struct-fields-delete-insert-test",
"expectedResult": {
"changes": {
"modifying-struct-fields.go": [
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
4
]
}
},
"summary": "Deleted the 'ctx' identifier in the main function"
},
{
"span": {
"delete": {
"start": [
4,
8
],
"end": [
6,
2
]
}
},
"summary": "Deleted the '&uploadContext{\n Remote: remote\n}' operator in the main function"
}
]
},
"errors": {}
},
"filePaths": [
"modifying-struct-fields.go"
],
"patch": [
"diff --git a/modifying-struct-fields.go b/modifying-struct-fields.go",
"index 8b8c10e6..79058077 100644",
"--- a/modifying-struct-fields.go",
"+++ b/modifying-struct-fields.go",
"@@ -1,7 +1,5 @@",
" package main",
" ",
" func main() {",
"-ctx := &uploadContext{",
"- Remote: remote",
"-}",
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "697657a456eb527a797dcae7f135a1e6d37a3df6..46a167a5893ffbcd888ea7adedf5cd4f9411280a"
}
,{
"testCaseDescription": "go-modifying-struct-fields-teardown-test",
"expectedResult": {
"changes": {
"modifying-struct-fields.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": [
"modifying-struct-fields.go"
],
"patch": [
"diff --git a/modifying-struct-fields.go b/modifying-struct-fields.go",
"index 79058077..e69de29b 100644",
"--- a/modifying-struct-fields.go",
"+++ b/modifying-struct-fields.go",
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "46a167a5893ffbcd888ea7adedf5cd4f9411280a..177fb35939c02b4bc6067142eab57a6cc2237513"
}]