[{ "testCaseDescription": "go-map-literals-setup-test", "expectedResult": { "changes": { "map-literals.go": [ { "span": { "insert": { "start": [ 1, 1 ], "end": [ 6, 1 ] } }, "summary": "Added the 'main' module" } ] }, "errors": {} }, "filePaths": [ "map-literals.go" ], "patch": [ "diff --git a/map-literals.go b/map-literals.go", "index e69de29..7905807 100644", "--- a/map-literals.go", "+++ b/map-literals.go", "@@ -0,0 +1,5 @@", "+package main", "+", "+func main() {", "+", "+}" ], "gitDir": "test/corpus/repos/go", "shas": "496e7a825e183ef3ec6927a5b2267ce1bae3160a..abc11e880021d2184c09d104f8d98772796d2858" } ,{ "testCaseDescription": "go-map-literals-insert-test", "expectedResult": { "changes": { "map-literals.go": [ { "span": { "insert": { "start": [ 4, 1 ], "end": [ 7, 2 ] } }, "summary": "Added the 's' variable in the main function of the 'main' module" }, { "span": { "insert": { "start": [ 4, 1 ], "end": [ 7, 2 ] } }, "summary": "Added the 'map[string]string' variable in the main function of the 'main' module" } ] }, "errors": {} }, "filePaths": [ "map-literals.go" ], "patch": [ "diff --git a/map-literals.go b/map-literals.go", "index 7905807..bb99b5b 100644", "--- a/map-literals.go", "+++ b/map-literals.go", "@@ -1,5 +1,8 @@", " package main", " ", " func main() {", "-", "+const s = map[string]string{", "+\"hi\": \"hello\",", "+\"bye\": \"goodbye\",", "+}", " }" ], "gitDir": "test/corpus/repos/go", "shas": "abc11e880021d2184c09d104f8d98772796d2858..012f1e560a68e929a2256f3beef4fc65136e1841" } ,{ "testCaseDescription": "go-map-literals-replacement-test", "expectedResult": { "changes": { "map-literals.go": [ { "span": { "delete": { "start": [ 4, 15 ], "end": [ 4, 21 ] } }, "summary": "Deleted the 'string' identifier in the map[string]int struct of the 'main' function" }, { "span": { "insert": { "start": [ 4, 22 ], "end": [ 4, 25 ] } }, "summary": "Added the 'int' identifier in the map[string]int struct of the 'main' function" }, { "span": { "replace": [ { "start": [ 5, 1 ], "end": [ 5, 5 ] }, { "start": [ 5, 1 ], "end": [ 5, 6 ] } ] }, "summary": "Replaced the \"hi\" string with the \"foo\" string in the map[string]int struct of the 'main' function" }, { "span": { "replace": [ { "start": [ 5, 7 ], "end": [ 5, 14 ] }, { "start": [ 5, 8 ], "end": [ 5, 13 ] } ] }, "summary": "Replaced the \"hello\" string with the \"bar\" string in the map[string]int struct of the 'main' function" }, { "span": { "replace": [ { "start": [ 6, 1 ], "end": [ 6, 6 ] }, { "start": [ 6, 1 ], "end": [ 6, 6 ] } ] }, "summary": "Replaced the \"bye\" string with the \"baz\" string in the map[string]int struct of the 'main' function" }, { "span": { "replace": [ { "start": [ 6, 8 ], "end": [ 6, 17 ] }, { "start": [ 6, 8 ], "end": [ 6, 15 ] } ] }, "summary": "Replaced the \"goodbye\" string with the \"hello\" string in the map[string]int struct of the 'main' function" } ] }, "errors": {} }, "filePaths": [ "map-literals.go" ], "patch": [ "diff --git a/map-literals.go b/map-literals.go", "index bb99b5b..a9e0b66 100644", "--- a/map-literals.go", "+++ b/map-literals.go", "@@ -1,8 +1,8 @@", " package main", " ", " func main() {", "-const s = map[string]string{", "-\"hi\": \"hello\",", "-\"bye\": \"goodbye\",", "+const s = map[string]int{", "+\"foo\": \"bar\",", "+\"baz\": \"hello\",", " }", " }" ], "gitDir": "test/corpus/repos/go", "shas": "012f1e560a68e929a2256f3beef4fc65136e1841..e49a702ed9f376e1ae41f571965fd7f4d2825023" } ,{ "testCaseDescription": "go-map-literals-delete-replacement-test", "expectedResult": { "changes": { "map-literals.go": [ { "span": { "replace": [ { "start": [ 4, 22 ], "end": [ 4, 25 ] }, { "start": [ 4, 15 ], "end": [ 4, 21 ] } ] }, "summary": "Replaced the 'int' identifier with the 'string' identifier in the map[string]string struct of the 'main' function" }, { "span": { "replace": [ { "start": [ 5, 1 ], "end": [ 5, 6 ] }, { "start": [ 5, 1 ], "end": [ 5, 5 ] } ] }, "summary": "Replaced the \"foo\" string with the \"hi\" string in the map[string]string struct of the 'main' function" }, { "span": { "replace": [ { "start": [ 5, 8 ], "end": [ 5, 13 ] }, { "start": [ 5, 7 ], "end": [ 5, 14 ] } ] }, "summary": "Replaced the \"bar\" string with the \"hello\" string in the map[string]string struct of the 'main' function" }, { "span": { "replace": [ { "start": [ 6, 1 ], "end": [ 6, 6 ] }, { "start": [ 6, 1 ], "end": [ 6, 6 ] } ] }, "summary": "Replaced the \"baz\" string with the \"bye\" string in the map[string]string struct of the 'main' function" }, { "span": { "replace": [ { "start": [ 6, 8 ], "end": [ 6, 15 ] }, { "start": [ 6, 8 ], "end": [ 6, 17 ] } ] }, "summary": "Replaced the \"hello\" string with the \"goodbye\" string in the map[string]string struct of the 'main' function" } ] }, "errors": {} }, "filePaths": [ "map-literals.go" ], "patch": [ "diff --git a/map-literals.go b/map-literals.go", "index a9e0b66..bb99b5b 100644", "--- a/map-literals.go", "+++ b/map-literals.go", "@@ -1,8 +1,8 @@", " package main", " ", " func main() {", "-const s = map[string]int{", "-\"foo\": \"bar\",", "-\"baz\": \"hello\",", "+const s = map[string]string{", "+\"hi\": \"hello\",", "+\"bye\": \"goodbye\",", " }", " }" ], "gitDir": "test/corpus/repos/go", "shas": "e49a702ed9f376e1ae41f571965fd7f4d2825023..c1ea5e566c41c332faf31bdf3ec600054d0a9d6e" } ,{ "testCaseDescription": "go-map-literals-delete-insert-test", "expectedResult": { "changes": { "map-literals.go": [ { "span": { "delete": { "start": [ 4, 1 ], "end": [ 7, 2 ] } }, "summary": "Deleted the 's' variable in the main function of the 'main' module" }, { "span": { "delete": { "start": [ 4, 1 ], "end": [ 7, 2 ] } }, "summary": "Deleted the 'map[string]string' variable in the main function of the 'main' module" } ] }, "errors": {} }, "filePaths": [ "map-literals.go" ], "patch": [ "diff --git a/map-literals.go b/map-literals.go", "index bb99b5b..7905807 100644", "--- a/map-literals.go", "+++ b/map-literals.go", "@@ -1,8 +1,5 @@", " package main", " ", " func main() {", "-const s = map[string]string{", "-\"hi\": \"hello\",", "-\"bye\": \"goodbye\",", "-}", "+", " }" ], "gitDir": "test/corpus/repos/go", "shas": "c1ea5e566c41c332faf31bdf3ec600054d0a9d6e..864d0cc63daaf2a92a1a1293b2c56ce4f3e0db5d" } ,{ "testCaseDescription": "go-map-literals-teardown-test", "expectedResult": { "changes": { "map-literals.go": [ { "span": { "delete": { "start": [ 1, 1 ], "end": [ 6, 1 ] } }, "summary": "Deleted the 'main' module" } ] }, "errors": {} }, "filePaths": [ "map-literals.go" ], "patch": [ "diff --git a/map-literals.go b/map-literals.go", "index 7905807..e69de29 100644", "--- a/map-literals.go", "+++ b/map-literals.go", "@@ -1,5 +0,0 @@", "-package main", "-", "-func main() {", "-", "-}" ], "gitDir": "test/corpus/repos/go", "shas": "864d0cc63daaf2a92a1a1293b2c56ce4f3e0db5d..558c52a8cf3235254d5676618a9c13f09b7a1a76" }]