1
1
mirror of https://github.com/github/semantic.git synced 2024-12-01 09:15:01 +03:00

update tests

This commit is contained in:
joshvera 2016-12-01 16:03:52 -05:00
parent 9cd616f7b3
commit b9ac5d866d
53 changed files with 10704 additions and 35127 deletions

View File

@ -1,4 +1,46 @@
[{
"testCaseDescription": "go-array-types-setup-test",
"expectedResult": {
"changes": {
"array-types.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"array-types.go"
],
"patch": [
"diff --git a/array-types.go b/array-types.go",
"index e69de29..7905807 100644",
"--- a/array-types.go",
"+++ b/array-types.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "b2decfa67a83e49a4d1eded0e91148f44e6530f5..aadcbafbdc1859ede94b134df7cb87c45f59ee5e"
}
,{
"testCaseDescription": "go-array-types-insert-test",
"expectedResult": {
"changes": {
@ -7,61 +49,61 @@
"span": {
"insert": {
"start": [
1,
4,
6
],
"end": [
1,
4,
7
]
}
},
"summary": "Added the 'a' identifier"
"summary": "Added the 'a' identifier in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
1,
4,
9
],
"end": [
1,
4,
10
]
}
},
"summary": "Added the '2'"
"summary": "Added the '2' in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
1,
4,
11
],
"end": [
1,
4,
12
]
}
},
"summary": "Added the '2'"
"summary": "Added the '2' in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
1,
4,
13
],
"end": [
1,
4,
14
]
}
},
"summary": "Added the 'x' identifier"
"summary": "Added the 'x' identifier in the main function of the 'main' module"
}
]
},
@ -72,266 +114,19 @@
],
"patch": [
"diff --git a/array-types.go b/array-types.go",
"index e69de29..f9c11b8 100644",
"index 7905807..3f73aea 100644",
"--- a/array-types.go",
"+++ b/array-types.go",
"@@ -0,0 +1 @@",
"+type a [2+2]x"
],
"gitDir": "test/corpus/repos/go",
"shas": "4605c9308ffc84f9d63dc5e62562b0461d53d5b9..e72a08882ea7900f125d452420494cdf0f9dd5e4"
}
,{
"testCaseDescription": "go-array-types-replacement-insert-test",
"expectedResult": {
"changes": {
"array-types.go": [
{
"span": {
"insert": {
"start": [
1,
6
],
"end": [
1,
7
]
}
},
"summary": "Added the 'a' identifier"
},
{
"span": {
"insert": {
"start": [
1,
9
],
"end": [
1,
10
]
}
},
"summary": "Added the '1'"
},
{
"span": {
"insert": {
"start": [
1,
11
],
"end": [
1,
12
]
}
},
"summary": "Added the '1'"
},
{
"span": {
"insert": {
"start": [
1,
13
],
"end": [
1,
14
]
}
},
"summary": "Added the 'y' identifier"
},
{
"span": {
"insert": {
"start": [
2,
6
],
"end": [
2,
7
]
}
},
"summary": "Added the 'a' identifier"
},
{
"span": {
"insert": {
"start": [
2,
9
],
"end": [
2,
10
]
}
},
"summary": "Added the '2'"
},
{
"span": {
"insert": {
"start": [
2,
11
],
"end": [
2,
12
]
}
},
"summary": "Added the '2'"
},
{
"span": {
"insert": {
"start": [
2,
13
],
"end": [
2,
14
]
}
},
"summary": "Added the 'x' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"array-types.go"
],
"patch": [
"diff --git a/array-types.go b/array-types.go",
"index f9c11b8..d2b8166 100644",
"--- a/array-types.go",
"+++ b/array-types.go",
"@@ -1 +1,3 @@",
"+type a [1+1]y",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-",
"+type a [2+2]x",
" type a [2+2]x"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "e72a08882ea7900f125d452420494cdf0f9dd5e4..aa6f10e79008f9c024ed3883cec3d84f74157628"
}
,{
"testCaseDescription": "go-array-types-delete-insert-test",
"expectedResult": {
"changes": {
"array-types.go": [
{
"span": {
"replace": [
{
"start": [
1,
9
],
"end": [
1,
10
]
},
{
"start": [
1,
9
],
"end": [
1,
10
]
}
]
},
"summary": "Replaced '1' with '2'"
},
{
"span": {
"replace": [
{
"start": [
1,
11
],
"end": [
1,
12
]
},
{
"start": [
1,
11
],
"end": [
1,
12
]
}
]
},
"summary": "Replaced '1' with '2'"
},
{
"span": {
"replace": [
{
"start": [
1,
13
],
"end": [
1,
14
]
},
{
"start": [
1,
13
],
"end": [
1,
14
]
}
]
},
"summary": "Replaced the 'y' identifier with the 'x' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"array-types.go"
],
"patch": [
"diff --git a/array-types.go b/array-types.go",
"index d2b8166..823c5f1 100644",
"--- a/array-types.go",
"+++ b/array-types.go",
"@@ -1,3 +1,3 @@",
"-type a [1+1]y",
"+type a [2+2]x",
" type a [2+2]x",
" type a [2+2]x"
],
"gitDir": "test/corpus/repos/go",
"shas": "aa6f10e79008f9c024ed3883cec3d84f74157628..e89c6cb69bfb749d230d2d02cb2f121098bb9ca7"
"shas": "aadcbafbdc1859ede94b134df7cb87c45f59ee5e..dd35d7d52c01a8b3df78f38cf75309766b3c421f"
}
,{
"testCaseDescription": "go-array-types-replacement-test",
@ -343,81 +138,81 @@
"replace": [
{
"start": [
1,
4,
9
],
"end": [
1,
4,
10
]
},
{
"start": [
1,
4,
9
],
"end": [
1,
4,
10
]
}
]
},
"summary": "Replaced '2' with '1'"
"summary": "Replaced '2' with '1' in the main function of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
1,
4,
11
],
"end": [
1,
4,
12
]
},
{
"start": [
1,
4,
11
],
"end": [
1,
4,
12
]
}
]
},
"summary": "Replaced '2' with '1'"
"summary": "Replaced '2' with '1' in the main function of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
1,
4,
13
],
"end": [
1,
4,
14
]
},
{
"start": [
1,
4,
13
],
"end": [
1,
4,
14
]
}
]
},
"summary": "Replaced the 'x' identifier with the 'y' identifier"
"summary": "Replaced the 'x' identifier with the 'y' identifier in the main function of the 'main' module"
}
]
},
@ -428,17 +223,19 @@
],
"patch": [
"diff --git a/array-types.go b/array-types.go",
"index 823c5f1..d2b8166 100644",
"index 3f73aea..4978312 100644",
"--- a/array-types.go",
"+++ b/array-types.go",
"@@ -1,3 +1,3 @@",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-type a [2+2]x",
"+type a [1+1]y",
" type a [2+2]x",
" type a [2+2]x"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "e89c6cb69bfb749d230d2d02cb2f121098bb9ca7..cb40195715b97fd727f39a658f90da91280dfeb3"
"shas": "dd35d7d52c01a8b3df78f38cf75309766b3c421f..d19efb30e61f5764be7e4dd87d74ae8f11b54e3e"
}
,{
"testCaseDescription": "go-array-types-delete-replacement-test",
@ -447,183 +244,84 @@
"array-types.go": [
{
"span": {
"delete": {
"start": [
1,
6
],
"end": [
1,
7
]
}
"replace": [
{
"start": [
4,
9
],
"end": [
4,
10
]
},
{
"start": [
4,
9
],
"end": [
4,
10
]
}
]
},
"summary": "Deleted the 'a' identifier"
"summary": "Replaced '1' with '2' in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
1,
9
],
"end": [
1,
10
]
}
"replace": [
{
"start": [
4,
11
],
"end": [
4,
12
]
},
{
"start": [
4,
11
],
"end": [
4,
12
]
}
]
},
"summary": "Deleted the '1'"
"summary": "Replaced '1' with '2' in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
1,
11
],
"end": [
1,
12
]
}
"replace": [
{
"start": [
4,
13
],
"end": [
4,
14
]
},
{
"start": [
4,
13
],
"end": [
4,
14
]
}
]
},
"summary": "Deleted the '1'"
},
{
"span": {
"delete": {
"start": [
1,
13
],
"end": [
1,
14
]
}
},
"summary": "Deleted the 'y' identifier"
},
{
"span": {
"delete": {
"start": [
2,
6
],
"end": [
2,
7
]
}
},
"summary": "Deleted the 'a' identifier"
},
{
"span": {
"delete": {
"start": [
2,
9
],
"end": [
2,
10
]
}
},
"summary": "Deleted the '2'"
},
{
"span": {
"delete": {
"start": [
2,
11
],
"end": [
2,
12
]
}
},
"summary": "Deleted the '2'"
},
{
"span": {
"delete": {
"start": [
2,
13
],
"end": [
2,
14
]
}
},
"summary": "Deleted the 'x' identifier"
},
{
"span": {
"insert": {
"start": [
2,
6
],
"end": [
2,
7
]
}
},
"summary": "Added the 'a' identifier"
},
{
"span": {
"insert": {
"start": [
2,
9
],
"end": [
2,
10
]
}
},
"summary": "Added the '1'"
},
{
"span": {
"insert": {
"start": [
2,
11
],
"end": [
2,
12
]
}
},
"summary": "Added the '1'"
},
{
"span": {
"insert": {
"start": [
2,
13
],
"end": [
2,
14
]
}
},
"summary": "Added the 'y' identifier"
"summary": "Replaced the 'y' identifier with the 'x' identifier in the main function of the 'main' module"
}
]
},
@ -634,20 +332,22 @@
],
"patch": [
"diff --git a/array-types.go b/array-types.go",
"index d2b8166..5b93d14 100644",
"index 4978312..3f73aea 100644",
"--- a/array-types.go",
"+++ b/array-types.go",
"@@ -1,3 +1,2 @@",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-type a [1+1]y",
"-type a [2+2]x",
" type a [2+2]x",
"+type a [1+1]y"
"+type a [2+2]x",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "cb40195715b97fd727f39a658f90da91280dfeb3..9629b178034aa4530628081bc407e1c9009fe13d"
"shas": "d19efb30e61f5764be7e4dd87d74ae8f11b54e3e..9d4c1ab36fe8a26bd0928e10597616244b16848a"
}
,{
"testCaseDescription": "go-array-types-delete-test",
"testCaseDescription": "go-array-types-delete-insert-test",
"expectedResult": {
"changes": {
"array-types.go": [
@ -655,61 +355,61 @@
"span": {
"delete": {
"start": [
1,
4,
6
],
"end": [
1,
4,
7
]
}
},
"summary": "Deleted the 'a' identifier"
"summary": "Deleted the 'a' identifier in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
1,
4,
9
],
"end": [
1,
4,
10
]
}
},
"summary": "Deleted the '2'"
"summary": "Deleted the '2' in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
1,
4,
11
],
"end": [
1,
4,
12
]
}
},
"summary": "Deleted the '2'"
"summary": "Deleted the '2' in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
1,
4,
13
],
"end": [
1,
4,
14
]
}
},
"summary": "Deleted the 'x' identifier"
"summary": "Deleted the 'x' identifier in the main function of the 'main' module"
}
]
},
@ -720,18 +420,22 @@
],
"patch": [
"diff --git a/array-types.go b/array-types.go",
"index 5b93d14..967447e 100644",
"index 3f73aea..7905807 100644",
"--- a/array-types.go",
"+++ b/array-types.go",
"@@ -1,2 +1 @@",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-type a [2+2]x",
" type a [1+1]y"
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "9629b178034aa4530628081bc407e1c9009fe13d..d9b4ebb8d64c12b8efbc1fbdcc2c31bf584a17c2"
"shas": "9d4c1ab36fe8a26bd0928e10597616244b16848a..7a95a7047b9cfa2fd5db439524bc6f27fcbac273"
}
,{
"testCaseDescription": "go-array-types-delete-rest-test",
"testCaseDescription": "go-array-types-teardown-test",
"expectedResult": {
"changes": {
"array-types.go": [
@ -740,60 +444,15 @@
"delete": {
"start": [
1,
6
1
],
"end": [
1,
7
6,
1
]
}
},
"summary": "Deleted the 'a' identifier"
},
{
"span": {
"delete": {
"start": [
1,
9
],
"end": [
1,
10
]
}
},
"summary": "Deleted the '1'"
},
{
"span": {
"delete": {
"start": [
1,
11
],
"end": [
1,
12
]
}
},
"summary": "Deleted the '1'"
},
{
"span": {
"delete": {
"start": [
1,
13
],
"end": [
1,
14
]
}
},
"summary": "Deleted the 'y' identifier"
"summary": "Deleted the 'main' module"
}
]
},
@ -804,12 +463,16 @@
],
"patch": [
"diff --git a/array-types.go b/array-types.go",
"index 967447e..e69de29 100644",
"index 7905807..e69de29 100644",
"--- a/array-types.go",
"+++ b/array-types.go",
"@@ -1 +0,0 @@",
"-type a [1+1]y"
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "d9b4ebb8d64c12b8efbc1fbdcc2c31bf584a17c2..ecbb5b13e89407c4e715ccf67e358e5fc18fbfe6"
"shas": "7a95a7047b9cfa2fd5db439524bc6f27fcbac273..b2613e72526211d331fe3ee187e2503ae23f1b36"
}]

View File

@ -1,25 +1,49 @@
[{
"testCaseDescription": "go-array-with-implicit-length-setup-test",
"expectedResult": {
"changes": {
"array-with-implicit-length.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"array-with-implicit-length.go"
],
"patch": [
"diff --git a/array-with-implicit-length.go b/array-with-implicit-length.go",
"index e69de29..7905807 100644",
"--- a/array-with-implicit-length.go",
"+++ b/array-with-implicit-length.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "388f63ca683f5d2b478586fd640d5ca33433dc98..6b507d231ab9b25b483dacbc55958c08a047da71"
}
,{
"testCaseDescription": "go-array-with-implicit-length-insert-test",
"expectedResult": {
"changes": {
"array-with-implicit-length.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
29
]
}
},
"summary": "Added the 'a1' variable"
}
]
},
"changes": {},
"errors": {}
},
"filePaths": [
@ -27,271 +51,24 @@
],
"patch": [
"diff --git a/array-with-implicit-length.go b/array-with-implicit-length.go",
"index e69de29..96bef76 100644",
"index 7905807..a53dc8c 100644",
"--- a/array-with-implicit-length.go",
"+++ b/array-with-implicit-length.go",
"@@ -0,0 +1 @@",
"+const a1 = [...]int{1, 2, 3}"
],
"gitDir": "test/corpus/repos/go",
"shas": "0fff314fad0973ea89120a1ae3b7940e0f7866d2..d047fe40a9c741f62abe5a1313da6f36caca7979"
}
,{
"testCaseDescription": "go-array-with-implicit-length-replacement-insert-test",
"expectedResult": {
"changes": {
"array-with-implicit-length.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
27
]
}
},
"summary": "Added the 'a1' variable"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
29
]
}
},
"summary": "Added the 'a1' variable"
}
]
},
"errors": {}
},
"filePaths": [
"array-with-implicit-length.go"
],
"patch": [
"diff --git a/array-with-implicit-length.go b/array-with-implicit-length.go",
"index 96bef76..f49bee5 100644",
"--- a/array-with-implicit-length.go",
"+++ b/array-with-implicit-length.go",
"@@ -1 +1,3 @@",
"+const a1 = [...]int{4,5,6}",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-",
"+const a1 = [...]int{1, 2, 3}",
" const a1 = [...]int{1, 2, 3}"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "d047fe40a9c741f62abe5a1313da6f36caca7979..2fcb5b095ac3ea0981a515c3dd0f52c9212611d5"
}
,{
"testCaseDescription": "go-array-with-implicit-length-delete-insert-test",
"expectedResult": {
"changes": {
"array-with-implicit-length.go": [
{
"span": {
"replace": [
{
"start": [
1,
21
],
"end": [
1,
22
]
},
{
"start": [
1,
21
],
"end": [
1,
22
]
}
]
},
"summary": "Replaced '4' with '1' in the a1 variable"
},
{
"span": {
"insert": {
"start": [
1,
24
],
"end": [
1,
25
]
}
},
"summary": "Added '2' in the a1 variable"
},
{
"span": {
"replace": [
{
"start": [
1,
23
],
"end": [
1,
24
]
},
{
"start": [
1,
27
],
"end": [
1,
28
]
}
]
},
"summary": "Replaced '5' with '3' in the a1 variable"
},
{
"span": {
"delete": {
"start": [
1,
25
],
"end": [
1,
26
]
}
},
"summary": "Deleted '6' in the a1 variable"
}
]
},
"errors": {}
},
"filePaths": [
"array-with-implicit-length.go"
],
"patch": [
"diff --git a/array-with-implicit-length.go b/array-with-implicit-length.go",
"index f49bee5..9dcd627 100644",
"--- a/array-with-implicit-length.go",
"+++ b/array-with-implicit-length.go",
"@@ -1,3 +1,3 @@",
"-const a1 = [...]int{4,5,6}",
"+const a1 = [...]int{1, 2, 3}",
" const a1 = [...]int{1, 2, 3}",
" const a1 = [...]int{1, 2, 3}"
],
"gitDir": "test/corpus/repos/go",
"shas": "2fcb5b095ac3ea0981a515c3dd0f52c9212611d5..f07306969d190ef934d9e77f78c1af6e6aeb0d63"
"shas": "6b507d231ab9b25b483dacbc55958c08a047da71..c789d6ee9a40ab9103db744988cc59d9f7a31da9"
}
,{
"testCaseDescription": "go-array-with-implicit-length-replacement-test",
"expectedResult": {
"changes": {
"array-with-implicit-length.go": [
{
"span": {
"replace": [
{
"start": [
1,
21
],
"end": [
1,
22
]
},
{
"start": [
1,
21
],
"end": [
1,
22
]
}
]
},
"summary": "Replaced '1' with '4' in the a1 variable"
},
{
"span": {
"insert": {
"start": [
1,
23
],
"end": [
1,
24
]
}
},
"summary": "Added '5' in the a1 variable"
},
{
"span": {
"replace": [
{
"start": [
1,
24
],
"end": [
1,
25
]
},
{
"start": [
1,
25
],
"end": [
1,
26
]
}
]
},
"summary": "Replaced '2' with '6' in the a1 variable"
},
{
"span": {
"delete": {
"start": [
1,
27
],
"end": [
1,
28
]
}
},
"summary": "Deleted '3' in the a1 variable"
}
]
},
"changes": {},
"errors": {}
},
"filePaths": [
@ -299,70 +76,24 @@
],
"patch": [
"diff --git a/array-with-implicit-length.go b/array-with-implicit-length.go",
"index 9dcd627..f49bee5 100644",
"index a53dc8c..e9e3d08 100644",
"--- a/array-with-implicit-length.go",
"+++ b/array-with-implicit-length.go",
"@@ -1,3 +1,3 @@",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-const a1 = [...]int{1, 2, 3}",
"+const a1 = [...]int{4,5,6}",
" const a1 = [...]int{1, 2, 3}",
" const a1 = [...]int{1, 2, 3}"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "f07306969d190ef934d9e77f78c1af6e6aeb0d63..c40f719c69cda9a21d80cdc1f985fd913875eb7e"
"shas": "c789d6ee9a40ab9103db744988cc59d9f7a31da9..b4ccaa5f1e132e2c68f4a965ef3265b8e9b280b4"
}
,{
"testCaseDescription": "go-array-with-implicit-length-delete-replacement-test",
"expectedResult": {
"changes": {
"array-with-implicit-length.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
27
]
}
},
"summary": "Deleted the 'a1' variable"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
29
]
}
},
"summary": "Deleted the 'a1' variable"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
27
]
}
},
"summary": "Added the 'a1' variable"
}
]
},
"changes": {},
"errors": {}
},
"filePaths": [
@ -370,20 +101,47 @@
],
"patch": [
"diff --git a/array-with-implicit-length.go b/array-with-implicit-length.go",
"index f49bee5..47b9eed 100644",
"index e9e3d08..a53dc8c 100644",
"--- a/array-with-implicit-length.go",
"+++ b/array-with-implicit-length.go",
"@@ -1,3 +1,2 @@",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-const a1 = [...]int{4,5,6}",
"-const a1 = [...]int{1, 2, 3}",
" const a1 = [...]int{1, 2, 3}",
"+const a1 = [...]int{4,5,6}"
"+const a1 = [...]int{1, 2, 3}",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "c40f719c69cda9a21d80cdc1f985fd913875eb7e..6871f75087736569e032a112eaec06d72af2c580"
"shas": "b4ccaa5f1e132e2c68f4a965ef3265b8e9b280b4..0a61a5c2c9776f01fa6caccb481dbbcc41c6bae3"
}
,{
"testCaseDescription": "go-array-with-implicit-length-delete-test",
"testCaseDescription": "go-array-with-implicit-length-delete-insert-test",
"expectedResult": {
"changes": {},
"errors": {}
},
"filePaths": [
"array-with-implicit-length.go"
],
"patch": [
"diff --git a/array-with-implicit-length.go b/array-with-implicit-length.go",
"index a53dc8c..7905807 100644",
"--- a/array-with-implicit-length.go",
"+++ b/array-with-implicit-length.go",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-const a1 = [...]int{1, 2, 3}",
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "0a61a5c2c9776f01fa6caccb481dbbcc41c6bae3..c74e6058164aba2f6ac6e202ec081bd99b46a646"
}
,{
"testCaseDescription": "go-array-with-implicit-length-teardown-test",
"expectedResult": {
"changes": {
"array-with-implicit-length.go": [
@ -395,51 +153,12 @@
1
],
"end": [
1,
29
]
}
},
"summary": "Deleted the 'a1' variable"
}
]
},
"errors": {}
},
"filePaths": [
"array-with-implicit-length.go"
],
"patch": [
"diff --git a/array-with-implicit-length.go b/array-with-implicit-length.go",
"index 47b9eed..4a8295f 100644",
"--- a/array-with-implicit-length.go",
"+++ b/array-with-implicit-length.go",
"@@ -1,2 +1 @@",
"-const a1 = [...]int{1, 2, 3}",
" const a1 = [...]int{4,5,6}"
],
"gitDir": "test/corpus/repos/go",
"shas": "6871f75087736569e032a112eaec06d72af2c580..c4b7115fd6f988b0de691ac1ef1a25066093bfb3"
}
,{
"testCaseDescription": "go-array-with-implicit-length-delete-rest-test",
"expectedResult": {
"changes": {
"array-with-implicit-length.go": [
{
"span": {
"delete": {
"start": [
1,
6,
1
],
"end": [
1,
27
]
}
},
"summary": "Deleted the 'a1' variable"
"summary": "Deleted the 'main' module"
}
]
},
@ -450,12 +169,16 @@
],
"patch": [
"diff --git a/array-with-implicit-length.go b/array-with-implicit-length.go",
"index 4a8295f..e69de29 100644",
"index 7905807..e69de29 100644",
"--- a/array-with-implicit-length.go",
"+++ b/array-with-implicit-length.go",
"@@ -1 +0,0 @@",
"-const a1 = [...]int{4,5,6}"
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "c4b7115fd6f988b0de691ac1ef1a25066093bfb3..f366494a187af73e7fcf6d60c2aa3bb503543f80"
"shas": "c74e6058164aba2f6ac6e202ec081bd99b46a646..1c340f41729820f4163b3ed6143addb772139b7f"
}]

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,25 +1,49 @@
[{
"testCaseDescription": "go-const-declarations-with-types-setup-test",
"expectedResult": {
"changes": {
"const-declarations-with-types.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"const-declarations-with-types.go"
],
"patch": [
"diff --git a/const-declarations-with-types.go b/const-declarations-with-types.go",
"index e69de29..7905807 100644",
"--- a/const-declarations-with-types.go",
"+++ b/const-declarations-with-types.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "e09098a4b342e0742ced34883192d2d98564b43e..c6ba63a095a2dbca66c90db30c0fd910a81063a5"
}
,{
"testCaseDescription": "go-const-declarations-with-types-insert-test",
"expectedResult": {
"changes": {
"const-declarations-with-types.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
19
]
}
},
"summary": "Added the 'zero' variable"
}
]
},
"changes": {},
"errors": {}
},
"filePaths": [
@ -27,256 +51,24 @@
],
"patch": [
"diff --git a/const-declarations-with-types.go b/const-declarations-with-types.go",
"index e69de29..da3bfc4 100644",
"index 7905807..0adafad 100644",
"--- a/const-declarations-with-types.go",
"+++ b/const-declarations-with-types.go",
"@@ -0,0 +1 @@",
"+const zero int = 0"
],
"gitDir": "test/corpus/repos/go",
"shas": "32b315c37909ee768458a4eb9ea7845a06769621..961d92cdc9ebd9a80f0727b86581998c21fda958"
}
,{
"testCaseDescription": "go-const-declarations-with-types-replacement-insert-test",
"expectedResult": {
"changes": {
"const-declarations-with-types.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
30
]
}
},
"summary": "Added the 'one' variable"
},
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
30
]
}
},
"summary": "Added the 'two' variable"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
19
]
}
},
"summary": "Added the 'zero' variable"
}
]
},
"errors": {}
},
"filePaths": [
"const-declarations-with-types.go"
],
"patch": [
"diff --git a/const-declarations-with-types.go b/const-declarations-with-types.go",
"index da3bfc4..86f010e 100644",
"--- a/const-declarations-with-types.go",
"+++ b/const-declarations-with-types.go",
"@@ -1 +1,3 @@",
"+const one, two uiint64 = 1, 2",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-",
"+const zero int = 0",
" const zero int = 0"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "961d92cdc9ebd9a80f0727b86581998c21fda958..779569ab17705797005da9a929df5042304d6020"
}
,{
"testCaseDescription": "go-const-declarations-with-types-delete-insert-test",
"expectedResult": {
"changes": {
"const-declarations-with-types.go": [
{
"span": {
"replace": [
{
"start": [
1,
7
],
"end": [
1,
10
]
},
{
"start": [
1,
7
],
"end": [
1,
11
]
}
]
},
"summary": "Replaced the 'one' identifier with the 'zero' identifier in the zero variable"
},
{
"span": {
"replace": [
{
"start": [
1,
26
],
"end": [
1,
27
]
},
{
"start": [
1,
18
],
"end": [
1,
19
]
}
]
},
"summary": "Replaced '1' with '0' in the zero variable"
},
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
30
]
}
},
"summary": "Deleted the 'two' variable"
}
]
},
"errors": {}
},
"filePaths": [
"const-declarations-with-types.go"
],
"patch": [
"diff --git a/const-declarations-with-types.go b/const-declarations-with-types.go",
"index 86f010e..049ca7f 100644",
"--- a/const-declarations-with-types.go",
"+++ b/const-declarations-with-types.go",
"@@ -1,3 +1,3 @@",
"-const one, two uiint64 = 1, 2",
"+const zero int = 0",
" const zero int = 0",
" const zero int = 0"
],
"gitDir": "test/corpus/repos/go",
"shas": "779569ab17705797005da9a929df5042304d6020..f37b24c77b0054da8b553755c7729956dab62808"
"shas": "c6ba63a095a2dbca66c90db30c0fd910a81063a5..30d044efa007c3850fba1feef3fa90cd21fea6e2"
}
,{
"testCaseDescription": "go-const-declarations-with-types-replacement-test",
"expectedResult": {
"changes": {
"const-declarations-with-types.go": [
{
"span": {
"replace": [
{
"start": [
1,
7
],
"end": [
1,
11
]
},
{
"start": [
1,
7
],
"end": [
1,
10
]
}
]
},
"summary": "Replaced the 'zero' identifier with the 'one' identifier in the one variable"
},
{
"span": {
"replace": [
{
"start": [
1,
18
],
"end": [
1,
19
]
},
{
"start": [
1,
26
],
"end": [
1,
27
]
}
]
},
"summary": "Replaced '0' with '1' in the one variable"
},
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
30
]
}
},
"summary": "Added the 'two' variable"
}
]
},
"changes": {},
"errors": {}
},
"filePaths": [
@ -284,100 +76,24 @@
],
"patch": [
"diff --git a/const-declarations-with-types.go b/const-declarations-with-types.go",
"index 049ca7f..86f010e 100644",
"index 0adafad..901589b 100644",
"--- a/const-declarations-with-types.go",
"+++ b/const-declarations-with-types.go",
"@@ -1,3 +1,3 @@",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-const zero int = 0",
"+const one, two uiint64 = 1, 2",
" const zero int = 0",
" const zero int = 0"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "f37b24c77b0054da8b553755c7729956dab62808..6294219449121c8cbd20d3ba524890dceb6e138e"
"shas": "30d044efa007c3850fba1feef3fa90cd21fea6e2..0f5966e43c4f55673326feaaca4bef56873ebff1"
}
,{
"testCaseDescription": "go-const-declarations-with-types-delete-replacement-test",
"expectedResult": {
"changes": {
"const-declarations-with-types.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
30
]
}
},
"summary": "Deleted the 'one' variable"
},
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
30
]
}
},
"summary": "Deleted the 'two' variable"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
19
]
}
},
"summary": "Deleted the 'zero' variable"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
30
]
}
},
"summary": "Added the 'one' variable"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
30
]
}
},
"summary": "Added the 'two' variable"
}
]
},
"changes": {},
"errors": {}
},
"filePaths": [
@ -385,20 +101,47 @@
],
"patch": [
"diff --git a/const-declarations-with-types.go b/const-declarations-with-types.go",
"index 86f010e..f035105 100644",
"index 901589b..0adafad 100644",
"--- a/const-declarations-with-types.go",
"+++ b/const-declarations-with-types.go",
"@@ -1,3 +1,2 @@",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-const one, two uiint64 = 1, 2",
"-const zero int = 0",
" const zero int = 0",
"+const one, two uiint64 = 1, 2"
"+const zero int = 0",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "6294219449121c8cbd20d3ba524890dceb6e138e..7310b361570cf43ce24c55caf717fc64069a2d3b"
"shas": "0f5966e43c4f55673326feaaca4bef56873ebff1..0ebfa3dc11804a03fac5ea89aaf6082de146b5ff"
}
,{
"testCaseDescription": "go-const-declarations-with-types-delete-test",
"testCaseDescription": "go-const-declarations-with-types-delete-insert-test",
"expectedResult": {
"changes": {},
"errors": {}
},
"filePaths": [
"const-declarations-with-types.go"
],
"patch": [
"diff --git a/const-declarations-with-types.go b/const-declarations-with-types.go",
"index 0adafad..7905807 100644",
"--- a/const-declarations-with-types.go",
"+++ b/const-declarations-with-types.go",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-const zero int = 0",
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "0ebfa3dc11804a03fac5ea89aaf6082de146b5ff..a7c8ef9b0ab5a63ae3cd0f1b9b1c69777d970dca"
}
,{
"testCaseDescription": "go-const-declarations-with-types-teardown-test",
"expectedResult": {
"changes": {
"const-declarations-with-types.go": [
@ -410,12 +153,12 @@
1
],
"end": [
1,
19
6,
1
]
}
},
"summary": "Deleted the 'zero' variable"
"summary": "Deleted the 'main' module"
}
]
},
@ -426,66 +169,16 @@
],
"patch": [
"diff --git a/const-declarations-with-types.go b/const-declarations-with-types.go",
"index f035105..716746a 100644",
"index 7905807..e69de29 100644",
"--- a/const-declarations-with-types.go",
"+++ b/const-declarations-with-types.go",
"@@ -1,2 +1 @@",
"-const zero int = 0",
" const one, two uiint64 = 1, 2"
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "7310b361570cf43ce24c55caf717fc64069a2d3b..c3d27a164e9197991bd4390391a3699327e8e1b0"
}
,{
"testCaseDescription": "go-const-declarations-with-types-delete-rest-test",
"expectedResult": {
"changes": {
"const-declarations-with-types.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
30
]
}
},
"summary": "Deleted the 'one' variable"
},
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
30
]
}
},
"summary": "Deleted the 'two' variable"
}
]
},
"errors": {}
},
"filePaths": [
"const-declarations-with-types.go"
],
"patch": [
"diff --git a/const-declarations-with-types.go b/const-declarations-with-types.go",
"index 716746a..e69de29 100644",
"--- a/const-declarations-with-types.go",
"+++ b/const-declarations-with-types.go",
"@@ -1 +0,0 @@",
"-const one, two uiint64 = 1, 2"
],
"gitDir": "test/corpus/repos/go",
"shas": "c3d27a164e9197991bd4390391a3699327e8e1b0..5352a466a13a8f3f02aa66c9a40c94ce75e0e613"
"shas": "a7c8ef9b0ab5a63ae3cd0f1b9b1c69777d970dca..880d1356428938ef5f360e9367e76e80a3642744"
}]

View File

@ -1,25 +1,49 @@
[{
"testCaseDescription": "go-const-declarations-without-types-setup-test",
"expectedResult": {
"changes": {
"const-declarations-without-types.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"const-declarations-without-types.go"
],
"patch": [
"diff --git a/const-declarations-without-types.go b/const-declarations-without-types.go",
"index e69de29..7905807 100644",
"--- a/const-declarations-without-types.go",
"+++ b/const-declarations-without-types.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "730825bc7c52e6181896716064368b31590acc24..bdd5e250abd37a27237121d6d47ef01db1ced9c1"
}
,{
"testCaseDescription": "go-const-declarations-without-types-insert-test",
"expectedResult": {
"changes": {
"const-declarations-without-types.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
15
]
}
},
"summary": "Added the 'zero' variable"
}
]
},
"changes": {},
"errors": {}
},
"filePaths": [
@ -27,256 +51,24 @@
],
"patch": [
"diff --git a/const-declarations-without-types.go b/const-declarations-without-types.go",
"index e69de29..2f2e175 100644",
"index 7905807..7ef3805 100644",
"--- a/const-declarations-without-types.go",
"+++ b/const-declarations-without-types.go",
"@@ -0,0 +1 @@",
"+const zero = 0"
],
"gitDir": "test/corpus/repos/go",
"shas": "e3cc7c05800e63045739cf83cc9bed769e582946..7893139bc48344b1c6e4eb30e84badf05a6da6b9"
}
,{
"testCaseDescription": "go-const-declarations-without-types-replacement-insert-test",
"expectedResult": {
"changes": {
"const-declarations-without-types.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
22
]
}
},
"summary": "Added the 'one' variable"
},
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
22
]
}
},
"summary": "Added the 'two' variable"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
15
]
}
},
"summary": "Added the 'zero' variable"
}
]
},
"errors": {}
},
"filePaths": [
"const-declarations-without-types.go"
],
"patch": [
"diff --git a/const-declarations-without-types.go b/const-declarations-without-types.go",
"index 2f2e175..2d4a6fd 100644",
"--- a/const-declarations-without-types.go",
"+++ b/const-declarations-without-types.go",
"@@ -1 +1,3 @@",
"+const one, two = 1, 2",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-",
"+const zero = 0",
" const zero = 0"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "7893139bc48344b1c6e4eb30e84badf05a6da6b9..f2ca37e6df2f0e6601317ce53fa41dae85ac6eb7"
}
,{
"testCaseDescription": "go-const-declarations-without-types-delete-insert-test",
"expectedResult": {
"changes": {
"const-declarations-without-types.go": [
{
"span": {
"replace": [
{
"start": [
1,
7
],
"end": [
1,
10
]
},
{
"start": [
1,
7
],
"end": [
1,
11
]
}
]
},
"summary": "Replaced the 'one' identifier with the 'zero' identifier in the zero variable"
},
{
"span": {
"replace": [
{
"start": [
1,
18
],
"end": [
1,
19
]
},
{
"start": [
1,
14
],
"end": [
1,
15
]
}
]
},
"summary": "Replaced '1' with '0' in the zero variable"
},
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
22
]
}
},
"summary": "Deleted the 'two' variable"
}
]
},
"errors": {}
},
"filePaths": [
"const-declarations-without-types.go"
],
"patch": [
"diff --git a/const-declarations-without-types.go b/const-declarations-without-types.go",
"index 2d4a6fd..b60f29e 100644",
"--- a/const-declarations-without-types.go",
"+++ b/const-declarations-without-types.go",
"@@ -1,3 +1,3 @@",
"-const one, two = 1, 2",
"+const zero = 0",
" const zero = 0",
" const zero = 0"
],
"gitDir": "test/corpus/repos/go",
"shas": "f2ca37e6df2f0e6601317ce53fa41dae85ac6eb7..ac0f95fa20cf28c4db79a2d2a6ea3748cf3a5c53"
"shas": "bdd5e250abd37a27237121d6d47ef01db1ced9c1..ea9bca5616f7c14365413c75a386db403cd884d0"
}
,{
"testCaseDescription": "go-const-declarations-without-types-replacement-test",
"expectedResult": {
"changes": {
"const-declarations-without-types.go": [
{
"span": {
"replace": [
{
"start": [
1,
7
],
"end": [
1,
11
]
},
{
"start": [
1,
7
],
"end": [
1,
10
]
}
]
},
"summary": "Replaced the 'zero' identifier with the 'one' identifier in the one variable"
},
{
"span": {
"replace": [
{
"start": [
1,
14
],
"end": [
1,
15
]
},
{
"start": [
1,
18
],
"end": [
1,
19
]
}
]
},
"summary": "Replaced '0' with '1' in the one variable"
},
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
22
]
}
},
"summary": "Added the 'two' variable"
}
]
},
"changes": {},
"errors": {}
},
"filePaths": [
@ -284,100 +76,24 @@
],
"patch": [
"diff --git a/const-declarations-without-types.go b/const-declarations-without-types.go",
"index b60f29e..2d4a6fd 100644",
"index 7ef3805..c4525e2 100644",
"--- a/const-declarations-without-types.go",
"+++ b/const-declarations-without-types.go",
"@@ -1,3 +1,3 @@",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-const zero = 0",
"+const one, two = 1, 2",
" const zero = 0",
" const zero = 0"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "ac0f95fa20cf28c4db79a2d2a6ea3748cf3a5c53..cc922e34d63773be705f8bb45da94eb6633d6d9d"
"shas": "ea9bca5616f7c14365413c75a386db403cd884d0..f927ee16a794db8dbb0c68caeb99bf4fed90ab4f"
}
,{
"testCaseDescription": "go-const-declarations-without-types-delete-replacement-test",
"expectedResult": {
"changes": {
"const-declarations-without-types.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
22
]
}
},
"summary": "Deleted the 'one' variable"
},
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
22
]
}
},
"summary": "Deleted the 'two' variable"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
15
]
}
},
"summary": "Deleted the 'zero' variable"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
22
]
}
},
"summary": "Added the 'one' variable"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
22
]
}
},
"summary": "Added the 'two' variable"
}
]
},
"changes": {},
"errors": {}
},
"filePaths": [
@ -385,20 +101,47 @@
],
"patch": [
"diff --git a/const-declarations-without-types.go b/const-declarations-without-types.go",
"index 2d4a6fd..0cb8229 100644",
"index c4525e2..7ef3805 100644",
"--- a/const-declarations-without-types.go",
"+++ b/const-declarations-without-types.go",
"@@ -1,3 +1,2 @@",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-const one, two = 1, 2",
"-const zero = 0",
" const zero = 0",
"+const one, two = 1, 2"
"+const zero = 0",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "cc922e34d63773be705f8bb45da94eb6633d6d9d..4f7206f8d97e09d920a16ed0d34acd5d03a7993a"
"shas": "f927ee16a794db8dbb0c68caeb99bf4fed90ab4f..ece98d48d31cb7242a0273fbe4775fb3a7363387"
}
,{
"testCaseDescription": "go-const-declarations-without-types-delete-test",
"testCaseDescription": "go-const-declarations-without-types-delete-insert-test",
"expectedResult": {
"changes": {},
"errors": {}
},
"filePaths": [
"const-declarations-without-types.go"
],
"patch": [
"diff --git a/const-declarations-without-types.go b/const-declarations-without-types.go",
"index 7ef3805..7905807 100644",
"--- a/const-declarations-without-types.go",
"+++ b/const-declarations-without-types.go",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-const zero = 0",
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "ece98d48d31cb7242a0273fbe4775fb3a7363387..c17edd6ea7997259409ea39e73eb4739831873b0"
}
,{
"testCaseDescription": "go-const-declarations-without-types-teardown-test",
"expectedResult": {
"changes": {
"const-declarations-without-types.go": [
@ -410,12 +153,12 @@
1
],
"end": [
1,
15
6,
1
]
}
},
"summary": "Deleted the 'zero' variable"
"summary": "Deleted the 'main' module"
}
]
},
@ -426,66 +169,16 @@
],
"patch": [
"diff --git a/const-declarations-without-types.go b/const-declarations-without-types.go",
"index 0cb8229..83cc71f 100644",
"index 7905807..e69de29 100644",
"--- a/const-declarations-without-types.go",
"+++ b/const-declarations-without-types.go",
"@@ -1,2 +1 @@",
"-const zero = 0",
" const one, two = 1, 2"
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "4f7206f8d97e09d920a16ed0d34acd5d03a7993a..65836ac955a739028b5745b140b306784a47fadf"
}
,{
"testCaseDescription": "go-const-declarations-without-types-delete-rest-test",
"expectedResult": {
"changes": {
"const-declarations-without-types.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
22
]
}
},
"summary": "Deleted the 'one' variable"
},
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
22
]
}
},
"summary": "Deleted the 'two' variable"
}
]
},
"errors": {}
},
"filePaths": [
"const-declarations-without-types.go"
],
"patch": [
"diff --git a/const-declarations-without-types.go b/const-declarations-without-types.go",
"index 83cc71f..e69de29 100644",
"--- a/const-declarations-without-types.go",
"+++ b/const-declarations-without-types.go",
"@@ -1 +0,0 @@",
"-const one, two = 1, 2"
],
"gitDir": "test/corpus/repos/go",
"shas": "65836ac955a739028b5745b140b306784a47fadf..32b315c37909ee768458a4eb9ea7845a06769621"
"shas": "c17edd6ea7997259409ea39e73eb4739831873b0..e09098a4b342e0742ced34883192d2d98564b43e"
}]

View File

@ -1,5 +1,5 @@
[{
"testCaseDescription": "go-const-with-implicit-values-insert-test",
"testCaseDescription": "go-const-with-implicit-values-setup-test",
"expectedResult": {
"changes": {
"const-with-implicit-values.go": [
@ -11,42 +11,12 @@
1
],
"end": [
5,
3
]
}
},
"summary": "Added the 'zero' variable"
},
{
"span": {
"insert": {
"start": [
1,
6,
1
],
"end": [
5,
3
]
}
},
"summary": "Added the 'one' variable"
},
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
5,
3
]
}
},
"summary": "Added the 'two' variable"
"summary": "Added the 'main' module"
}
]
},
@ -57,116 +27,23 @@
],
"patch": [
"diff --git a/const-with-implicit-values.go b/const-with-implicit-values.go",
"index e69de29..938a571 100644",
"index e69de29..7905807 100644",
"--- a/const-with-implicit-values.go",
"+++ b/const-with-implicit-values.go",
"@@ -0,0 +1,5 @@",
"+const (",
"+ zero = iota",
"+ one",
"+ two",
"+ )"
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "eab68be4fe73c7ea63793058e38316a7eab75064..9c08f71afc4f67ed8399c2904fa3c511085e32fa"
"shas": "32ce16d6a75fdcdcea285470d9f16f60e6b267f1..18a80de724515a05321e035438e68394e0d9f108"
}
,{
"testCaseDescription": "go-const-with-implicit-values-replacement-insert-test",
"testCaseDescription": "go-const-with-implicit-values-insert-test",
"expectedResult": {
"changes": {
"const-with-implicit-values.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
5,
3
]
}
},
"summary": "Added the 'a' variable"
},
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
5,
3
]
}
},
"summary": "Added the 'b' variable"
},
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
5,
3
]
}
},
"summary": "Added the 'c' variable"
},
{
"span": {
"insert": {
"start": [
6,
1
],
"end": [
10,
3
]
}
},
"summary": "Added the 'zero' variable"
},
{
"span": {
"insert": {
"start": [
6,
1
],
"end": [
10,
3
]
}
},
"summary": "Added the 'one' variable"
},
{
"span": {
"insert": {
"start": [
6,
1
],
"end": [
10,
3
]
}
},
"summary": "Added the 'two' variable"
}
]
},
"changes": {},
"errors": {}
},
"filePaths": [
@ -174,229 +51,28 @@
],
"patch": [
"diff --git a/const-with-implicit-values.go b/const-with-implicit-values.go",
"index 938a571..071b359 100644",
"index 7905807..d98ee4c 100644",
"--- a/const-with-implicit-values.go",
"+++ b/const-with-implicit-values.go",
"@@ -1,4 +1,14 @@",
" const (",
"+ a = iota",
"+ b",
"+ c",
"+ )",
"@@ -1,5 +1,9 @@",
" package main",
" ",
" func main() {",
"-",
"+const (",
"+ zero = iota",
"+ one",
"+ two",
"+ )",
"+const (",
" zero = iota",
" one",
" two"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "9c08f71afc4f67ed8399c2904fa3c511085e32fa..a3fffc055f14421a39ce87b49fc3ac583af306f1"
}
,{
"testCaseDescription": "go-const-with-implicit-values-delete-insert-test",
"expectedResult": {
"changes": {
"const-with-implicit-values.go": [
{
"span": {
"replace": [
{
"start": [
2,
2
],
"end": [
2,
3
]
},
{
"start": [
2,
2
],
"end": [
2,
6
]
}
]
},
"summary": "Replaced the 'a' identifier with the 'zero' identifier in the zero variable"
},
{
"span": {
"replace": [
{
"start": [
3,
2
],
"end": [
3,
3
]
},
{
"start": [
3,
2
],
"end": [
3,
5
]
}
]
},
"summary": "Replaced the 'b' identifier with the 'one' identifier"
},
{
"span": {
"replace": [
{
"start": [
4,
2
],
"end": [
4,
3
]
},
{
"start": [
4,
2
],
"end": [
4,
5
]
}
]
},
"summary": "Replaced the 'c' identifier with the 'two' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"const-with-implicit-values.go"
],
"patch": [
"diff --git a/const-with-implicit-values.go b/const-with-implicit-values.go",
"index 071b359..8a6d638 100644",
"--- a/const-with-implicit-values.go",
"+++ b/const-with-implicit-values.go",
"@@ -1,7 +1,7 @@",
" const (",
"- a = iota",
"- b",
"- c",
"+ zero = iota",
"+ one",
"+ two",
" )",
" const (",
" zero = iota"
],
"gitDir": "test/corpus/repos/go",
"shas": "a3fffc055f14421a39ce87b49fc3ac583af306f1..2c83dd0ff7ac9b61cd2d2155917f60c1578bd472"
"shas": "18a80de724515a05321e035438e68394e0d9f108..b4d6ea1f398cf574380f35d7869571760e11c05a"
}
,{
"testCaseDescription": "go-const-with-implicit-values-replacement-test",
"expectedResult": {
"changes": {
"const-with-implicit-values.go": [
{
"span": {
"replace": [
{
"start": [
2,
2
],
"end": [
2,
6
]
},
{
"start": [
2,
2
],
"end": [
2,
3
]
}
]
},
"summary": "Replaced the 'zero' identifier with the 'a' identifier in the a variable"
},
{
"span": {
"replace": [
{
"start": [
3,
2
],
"end": [
3,
5
]
},
{
"start": [
3,
2
],
"end": [
3,
3
]
}
]
},
"summary": "Replaced the 'one' identifier with the 'b' identifier"
},
{
"span": {
"replace": [
{
"start": [
4,
2
],
"end": [
4,
5
]
},
{
"start": [
4,
2
],
"end": [
4,
3
]
}
]
},
"summary": "Replaced the 'two' identifier with the 'c' identifier"
}
]
},
"changes": {},
"errors": {}
},
"filePaths": [
@ -404,10 +80,12 @@
],
"patch": [
"diff --git a/const-with-implicit-values.go b/const-with-implicit-values.go",
"index 8a6d638..071b359 100644",
"index d98ee4c..c4c9127 100644",
"--- a/const-with-implicit-values.go",
"+++ b/const-with-implicit-values.go",
"@@ -1,7 +1,7 @@",
"@@ -2,8 +2,8 @@ package main",
" ",
" func main() {",
" const (",
"- zero = iota",
"- one",
@ -416,154 +94,15 @@
"+ b",
"+ c",
" )",
" const (",
" zero = iota"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "2c83dd0ff7ac9b61cd2d2155917f60c1578bd472..eaa7f3281ecec5fa706b862a28ae1cfbcdac382d"
"shas": "b4d6ea1f398cf574380f35d7869571760e11c05a..a95f4d707dc2e723ba604d87779b7adac90ee7cc"
}
,{
"testCaseDescription": "go-const-with-implicit-values-delete-replacement-test",
"expectedResult": {
"changes": {
"const-with-implicit-values.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
5,
3
]
}
},
"summary": "Deleted the 'a' variable"
},
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
5,
3
]
}
},
"summary": "Deleted the 'b' variable"
},
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
5,
3
]
}
},
"summary": "Deleted the 'c' variable"
},
{
"span": {
"delete": {
"start": [
6,
1
],
"end": [
10,
3
]
}
},
"summary": "Deleted the 'zero' variable"
},
{
"span": {
"delete": {
"start": [
6,
1
],
"end": [
10,
3
]
}
},
"summary": "Deleted the 'one' variable"
},
{
"span": {
"delete": {
"start": [
6,
1
],
"end": [
10,
3
]
}
},
"summary": "Deleted the 'two' variable"
},
{
"span": {
"insert": {
"start": [
6,
1
],
"end": [
10,
3
]
}
},
"summary": "Added the 'a' variable"
},
{
"span": {
"insert": {
"start": [
6,
1
],
"end": [
10,
3
]
}
},
"summary": "Added the 'b' variable"
},
{
"span": {
"insert": {
"start": [
6,
1
],
"end": [
10,
3
]
}
},
"summary": "Added the 'c' variable"
}
]
},
"changes": {},
"errors": {}
},
"filePaths": [
@ -571,84 +110,29 @@
],
"patch": [
"diff --git a/const-with-implicit-values.go b/const-with-implicit-values.go",
"index 071b359..ae8b277 100644",
"index c4c9127..d98ee4c 100644",
"--- a/const-with-implicit-values.go",
"+++ b/const-with-implicit-values.go",
"@@ -1,15 +1,10 @@",
"@@ -2,8 +2,8 @@ package main",
" ",
" func main() {",
" const (",
"- a = iota",
"- b",
"- c",
"- )",
"-const (",
" zero = iota",
" one",
" two",
"+ zero = iota",
"+ one",
"+ two",
" )",
" const (",
"- zero = iota",
"- one",
"- two",
"+ a = iota",
"+ b",
"+ c",
" )"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "eaa7f3281ecec5fa706b862a28ae1cfbcdac382d..697b694fcc19b4223284ab44c961bd9544dcdaa3"
"shas": "a95f4d707dc2e723ba604d87779b7adac90ee7cc..4d7927d922ad2fa5e453759d13ec37cb8d322b66"
}
,{
"testCaseDescription": "go-const-with-implicit-values-delete-test",
"testCaseDescription": "go-const-with-implicit-values-delete-insert-test",
"expectedResult": {
"changes": {
"const-with-implicit-values.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
5,
3
]
}
},
"summary": "Deleted the 'zero' variable"
},
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
5,
3
]
}
},
"summary": "Deleted the 'one' variable"
},
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
5,
3
]
}
},
"summary": "Deleted the 'two' variable"
}
]
},
"changes": {},
"errors": {}
},
"filePaths": [
@ -656,25 +140,26 @@
],
"patch": [
"diff --git a/const-with-implicit-values.go b/const-with-implicit-values.go",
"index ae8b277..dfb4fad 100644",
"index d98ee4c..7905807 100644",
"--- a/const-with-implicit-values.go",
"+++ b/const-with-implicit-values.go",
"@@ -1,9 +1,4 @@",
" const (",
"@@ -1,9 +1,5 @@",
" package main",
" ",
" func main() {",
"-const (",
"- zero = iota",
"- one",
"- two",
"- )",
"-const (",
" a = iota",
" b",
" c"
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "697b694fcc19b4223284ab44c961bd9544dcdaa3..512cbb151aefa21474c28b2baae09a6eee09bcf5"
"shas": "4d7927d922ad2fa5e453759d13ec37cb8d322b66..aac4afa577603bf906a4d3e1e77e0fd4bfe6b774"
}
,{
"testCaseDescription": "go-const-with-implicit-values-delete-rest-test",
"testCaseDescription": "go-const-with-implicit-values-teardown-test",
"expectedResult": {
"changes": {
"const-with-implicit-values.go": [
@ -686,42 +171,12 @@
1
],
"end": [
5,
3
]
}
},
"summary": "Deleted the 'a' variable"
},
{
"span": {
"delete": {
"start": [
1,
6,
1
],
"end": [
5,
3
]
}
},
"summary": "Deleted the 'b' variable"
},
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
5,
3
]
}
},
"summary": "Deleted the 'c' variable"
"summary": "Deleted the 'main' module"
}
]
},
@ -732,16 +187,16 @@
],
"patch": [
"diff --git a/const-with-implicit-values.go b/const-with-implicit-values.go",
"index dfb4fad..e69de29 100644",
"index 7905807..e69de29 100644",
"--- a/const-with-implicit-values.go",
"+++ b/const-with-implicit-values.go",
"@@ -1,5 +0,0 @@",
"-const (",
"- a = iota",
"- b",
"- c",
"- )"
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "512cbb151aefa21474c28b2baae09a6eee09bcf5..966bee07072f36b83494af4ac7d3c83673e1f3f8"
"shas": "aac4afa577603bf906a4d3e1e77e0fd4bfe6b774..21e727f376a9c78c9ad9d0828abd21c3361ca339"
}]

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
[{
"testCaseDescription": "go-function-literals-insert-test",
"testCaseDescription": "go-function-literals-setup-test",
"expectedResult": {
"changes": {
"function-literals.go": [
@ -10,68 +10,13 @@
1,
1
],
"end": [
3,
2
]
}
},
"summary": "Added the 's1' variable"
}
]
},
"errors": {}
},
"filePaths": [
"function-literals.go"
],
"patch": [
"diff --git a/function-literals.go b/function-literals.go",
"index e69de29..49cbe77 100644",
"--- a/function-literals.go",
"+++ b/function-literals.go",
"@@ -0,0 +1,3 @@",
"+const s1 = func(s string) (int, int) {",
"+return 1, 2",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "8cef11ced56e7aed74af10acde19377ccfe0b6af..1dc216376d4051127f8fc7833470538864904865"
}
,{
"testCaseDescription": "go-function-literals-replacement-insert-test",
"expectedResult": {
"changes": {
"function-literals.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
3,
2
]
}
},
"summary": "Added the 's1' variable"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
6,
2
1
]
}
},
"summary": "Added the 's1' variable"
"summary": "Added the 'main' module"
}
]
},
@ -82,165 +27,50 @@
],
"patch": [
"diff --git a/function-literals.go b/function-literals.go",
"index 49cbe77..913c35a 100644",
"index e69de29..7905807 100644",
"--- a/function-literals.go",
"+++ b/function-literals.go",
"@@ -1,3 +1,9 @@",
"+const s1 = func(b int) (string, string) {",
"+return 1, 2",
"+}",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "a56878818f64edc11a87fbd108cfc010fc9bad79..40be0fe205af6e46aa65d6676e3eb04c110faf5f"
}
,{
"testCaseDescription": "go-function-literals-insert-test",
"expectedResult": {
"changes": {},
"errors": {}
},
"filePaths": [
"function-literals.go"
],
"patch": [
"diff --git a/function-literals.go b/function-literals.go",
"index 7905807..1f4ead9 100644",
"--- a/function-literals.go",
"+++ b/function-literals.go",
"@@ -1,5 +1,7 @@",
" package main",
" ",
" func main() {",
"-",
"+const s1 = func(s string) (int, int) {",
"+return 1, 2",
"+}",
" const s1 = func(s string) (int, int) {",
" return 1, 2",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "1dc216376d4051127f8fc7833470538864904865..0a1fc24e689a77c0b136e4702b5328ccfac82601"
}
,{
"testCaseDescription": "go-function-literals-delete-insert-test",
"expectedResult": {
"changes": {
"function-literals.go": [
{
"span": {
"replace": [
{
"start": [
1,
17
],
"end": [
1,
18
]
},
{
"start": [
1,
17
],
"end": [
1,
18
]
}
]
},
"summary": "Replaced the 'b' identifier with the 's' identifier in the s1 variable"
},
{
"span": {
"replace": [
{
"start": [
1,
19
],
"end": [
1,
22
]
},
{
"start": [
1,
19
],
"end": [
1,
25
]
}
]
},
"summary": "Replaced the 'int' identifier with the 'string' identifier in the s1 variable"
}
]
},
"errors": {}
},
"filePaths": [
"function-literals.go"
],
"patch": [
"diff --git a/function-literals.go b/function-literals.go",
"index 913c35a..731e2c6 100644",
"--- a/function-literals.go",
"+++ b/function-literals.go",
"@@ -1,4 +1,4 @@",
"-const s1 = func(b int) (string, string) {",
"+const s1 = func(s string) (int, int) {",
" return 1, 2",
" }",
" const s1 = func(s string) (int, int) {"
],
"gitDir": "test/corpus/repos/go",
"shas": "0a1fc24e689a77c0b136e4702b5328ccfac82601..a91d7138a089662fc0100619eaeff8fd15c4fbed"
"shas": "40be0fe205af6e46aa65d6676e3eb04c110faf5f..41cf3216e3aa0fc5606f5853721df0d41d716134"
}
,{
"testCaseDescription": "go-function-literals-replacement-test",
"expectedResult": {
"changes": {
"function-literals.go": [
{
"span": {
"replace": [
{
"start": [
1,
17
],
"end": [
1,
18
]
},
{
"start": [
1,
17
],
"end": [
1,
18
]
}
]
},
"summary": "Replaced the 's' identifier with the 'b' identifier in the s1 variable"
},
{
"span": {
"replace": [
{
"start": [
1,
19
],
"end": [
1,
25
]
},
{
"start": [
1,
19
],
"end": [
1,
22
]
}
]
},
"summary": "Replaced the 'string' identifier with the 'int' identifier in the s1 variable"
}
]
},
"changes": {},
"errors": {}
},
"filePaths": [
@ -248,71 +78,26 @@
],
"patch": [
"diff --git a/function-literals.go b/function-literals.go",
"index 731e2c6..913c35a 100644",
"index 1f4ead9..7b03466 100644",
"--- a/function-literals.go",
"+++ b/function-literals.go",
"@@ -1,4 +1,4 @@",
"@@ -1,7 +1,7 @@",
" package main",
" ",
" func main() {",
"-const s1 = func(s string) (int, int) {",
"+const s1 = func(b int) (string, string) {",
" return 1, 2",
" }",
" const s1 = func(s string) (int, int) {"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "a91d7138a089662fc0100619eaeff8fd15c4fbed..ad88b2ad21c0631a650d20f3b876ef0db92ec589"
"shas": "41cf3216e3aa0fc5606f5853721df0d41d716134..dc16488c6cd6213bb57bd44df53548c81dfb8881"
}
,{
"testCaseDescription": "go-function-literals-delete-replacement-test",
"expectedResult": {
"changes": {
"function-literals.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
3,
2
]
}
},
"summary": "Deleted the 's1' variable"
},
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
6,
2
]
}
},
"summary": "Deleted the 's1' variable"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
6,
2
]
}
},
"summary": "Added the 's1' variable"
}
]
},
"changes": {},
"errors": {}
},
"filePaths": [
@ -320,46 +105,26 @@
],
"patch": [
"diff --git a/function-literals.go b/function-literals.go",
"index 913c35a..51820bc 100644",
"index 7b03466..1f4ead9 100644",
"--- a/function-literals.go",
"+++ b/function-literals.go",
"@@ -1,9 +1,6 @@",
"@@ -1,7 +1,7 @@",
" package main",
" ",
" func main() {",
"-const s1 = func(b int) (string, string) {",
"-return 1, 2",
"-}",
" const s1 = func(s string) (int, int) {",
"+const s1 = func(s string) (int, int) {",
" return 1, 2",
" }",
"-const s1 = func(s string) (int, int) {",
"+const s1 = func(b int) (string, string) {",
" return 1, 2",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "ad88b2ad21c0631a650d20f3b876ef0db92ec589..54387de238ddc7806f785f4b874a5fcf20c70808"
"shas": "dc16488c6cd6213bb57bd44df53548c81dfb8881..8bfb3e0f5ba991d28b19484790114836ad254898"
}
,{
"testCaseDescription": "go-function-literals-delete-test",
"testCaseDescription": "go-function-literals-delete-insert-test",
"expectedResult": {
"changes": {
"function-literals.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
3,
2
]
}
},
"summary": "Deleted the 's1' variable"
}
]
},
"changes": {},
"errors": {}
},
"filePaths": [
@ -367,22 +132,24 @@
],
"patch": [
"diff --git a/function-literals.go b/function-literals.go",
"index 51820bc..d21dc2d 100644",
"index 1f4ead9..7905807 100644",
"--- a/function-literals.go",
"+++ b/function-literals.go",
"@@ -1,6 +1,3 @@",
"@@ -1,7 +1,5 @@",
" package main",
" ",
" func main() {",
"-const s1 = func(s string) (int, int) {",
"-return 1, 2",
"-}",
" const s1 = func(b int) (string, string) {",
" return 1, 2",
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "54387de238ddc7806f785f4b874a5fcf20c70808..68548df887acedb0540ef6087756db5c6a0a5c47"
"shas": "8bfb3e0f5ba991d28b19484790114836ad254898..2581e4cad574fe5cf4303b2f372c4377f20c7209"
}
,{
"testCaseDescription": "go-function-literals-delete-rest-test",
"testCaseDescription": "go-function-literals-teardown-test",
"expectedResult": {
"changes": {
"function-literals.go": [
@ -394,12 +161,12 @@
1
],
"end": [
3,
2
6,
1
]
}
},
"summary": "Deleted the 's1' variable"
"summary": "Deleted the 'main' module"
}
]
},
@ -410,14 +177,16 @@
],
"patch": [
"diff --git a/function-literals.go b/function-literals.go",
"index d21dc2d..e69de29 100644",
"index 7905807..e69de29 100644",
"--- a/function-literals.go",
"+++ b/function-literals.go",
"@@ -1,3 +0,0 @@",
"-const s1 = func(b int) (string, string) {",
"-return 1, 2",
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "68548df887acedb0540ef6087756db5c6a0a5c47..e3cc7c05800e63045739cf83cc9bed769e582946"
"shas": "2581e4cad574fe5cf4303b2f372c4377f20c7209..730825bc7c52e6181896716064368b31590acc24"
}]

File diff suppressed because it is too large Load Diff

View File

@ -1,107 +1,50 @@
[{
"testCaseDescription": "go-go-and-defer-statements-setup-test",
"expectedResult": {
"changes": {
"go-and-defer-statements.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"go-and-defer-statements.go"
],
"patch": [
"diff --git a/go-and-defer-statements.go b/go-and-defer-statements.go",
"index e69de29..7905807 100644",
"--- a/go-and-defer-statements.go",
"+++ b/go-and-defer-statements.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "f1209a78afa8affbb1beab49835ca3220a10c4da..bf21cfa9699ef6b75d67d2067a5ca8a0ecb619e5"
}
,{
"testCaseDescription": "go-go-and-defer-statements-insert-test",
"expectedResult": {
"changes": {
"go-and-defer-statements.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
12
]
}
},
"summary": "Added the 'x[y]()' defer statement"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
9
]
}
},
"summary": "Added the 'x[y]()' go statement"
}
]
},
"errors": {}
},
"filePaths": [
"go-and-defer-statements.go"
],
"patch": [
"diff --git a/go-and-defer-statements.go b/go-and-defer-statements.go",
"index e69de29..2638f27 100644",
"--- a/go-and-defer-statements.go",
"+++ b/go-and-defer-statements.go",
"@@ -0,0 +1,2 @@",
"+defer x.y()",
"+go x.y()"
],
"gitDir": "test/corpus/repos/go",
"shas": "201c2f06d17d14e12c9861e2a94372fc41441178..4c2c5d9bf86b0e00910db4151d8cb1be6e261245"
}
,{
"testCaseDescription": "go-go-and-defer-statements-replacement-insert-test",
"expectedResult": {
"changes": {
"go-and-defer-statements.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
12
]
}
},
"summary": "Added the 'a[b]()' defer statement"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
9
]
}
},
"summary": "Added the 'c[d]()' go statement"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
12
]
}
},
"summary": "Added the 'x[y]()' defer statement"
},
{
"span": {
"insert": {
@ -111,11 +54,26 @@
],
"end": [
4,
12
]
}
},
"summary": "Added the 'x[y]()' defer statement in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
5,
9
]
}
},
"summary": "Added the 'x[y]()' go statement"
"summary": "Added the 'x[y]()' go statement in the main function of the 'main' module"
}
]
},
@ -126,156 +84,20 @@
],
"patch": [
"diff --git a/go-and-defer-statements.go b/go-and-defer-statements.go",
"index 2638f27..0cb11d5 100644",
"index 7905807..4eab499 100644",
"--- a/go-and-defer-statements.go",
"+++ b/go-and-defer-statements.go",
"@@ -1,2 +1,6 @@",
"+defer a.b()",
"+go c.d()",
"@@ -1,5 +1,6 @@",
" package main",
" ",
" func main() {",
"-",
"+defer x.y()",
"+go x.y()",
" defer x.y()",
" go x.y()"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "4c2c5d9bf86b0e00910db4151d8cb1be6e261245..0af27bad18af4c3f10e18adf6824bc24be7cdf18"
}
,{
"testCaseDescription": "go-go-and-defer-statements-delete-insert-test",
"expectedResult": {
"changes": {
"go-and-defer-statements.go": [
{
"span": {
"replace": [
{
"start": [
1,
7
],
"end": [
1,
8
]
},
{
"start": [
1,
7
],
"end": [
1,
8
]
}
]
},
"summary": "Replaced the 'a' identifier with the 'x' identifier in the x[y] subscript access"
},
{
"span": {
"replace": [
{
"start": [
1,
9
],
"end": [
1,
10
]
},
{
"start": [
1,
9
],
"end": [
1,
10
]
}
]
},
"summary": "Replaced the 'b' identifier with the 'y' identifier in the x[y] subscript access"
},
{
"span": {
"replace": [
{
"start": [
2,
4
],
"end": [
2,
5
]
},
{
"start": [
2,
4
],
"end": [
2,
5
]
}
]
},
"summary": "Replaced the 'c' identifier with the 'x' identifier in the x[y] subscript access"
},
{
"span": {
"replace": [
{
"start": [
2,
6
],
"end": [
2,
7
]
},
{
"start": [
2,
6
],
"end": [
2,
7
]
}
]
},
"summary": "Replaced the 'd' identifier with the 'y' identifier in the x[y] subscript access"
}
]
},
"errors": {}
},
"filePaths": [
"go-and-defer-statements.go"
],
"patch": [
"diff --git a/go-and-defer-statements.go b/go-and-defer-statements.go",
"index 0cb11d5..bdc42aa 100644",
"--- a/go-and-defer-statements.go",
"+++ b/go-and-defer-statements.go",
"@@ -1,5 +1,5 @@",
"-defer a.b()",
"-go c.d()",
"+defer x.y()",
"+go x.y()",
" defer x.y()",
" go x.y()",
" defer x.y()"
],
"gitDir": "test/corpus/repos/go",
"shas": "0af27bad18af4c3f10e18adf6824bc24be7cdf18..e8853de747eee3ecdd93e3344be1e54dbc28e8fe"
"shas": "bf21cfa9699ef6b75d67d2067a5ca8a0ecb619e5..e741cd1a1870ca8aa2dbb3f1fa50acda13b26c7e"
}
,{
"testCaseDescription": "go-go-and-defer-statements-replacement-test",
@ -287,108 +109,108 @@
"replace": [
{
"start": [
1,
4,
7
],
"end": [
1,
4,
8
]
},
{
"start": [
1,
4,
7
],
"end": [
1,
4,
8
]
}
]
},
"summary": "Replaced the 'x' identifier with the 'a' identifier in the a[b] subscript access"
"summary": "Replaced the 'x' identifier with the 'a' identifier in the a[b] subscript access of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
1,
4,
9
],
"end": [
1,
4,
10
]
},
{
"start": [
1,
4,
9
],
"end": [
1,
4,
10
]
}
]
},
"summary": "Replaced the 'y' identifier with the 'b' identifier in the a[b] subscript access"
"summary": "Replaced the 'y' identifier with the 'b' identifier in the a[b] subscript access of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
2,
5,
4
],
"end": [
2,
5,
5
]
},
{
"start": [
2,
5,
4
],
"end": [
2,
5,
5
]
}
]
},
"summary": "Replaced the 'x' identifier with the 'c' identifier in the c[d] subscript access"
"summary": "Replaced the 'x' identifier with the 'c' identifier in the c[d] subscript access of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
2,
5,
6
],
"end": [
2,
5,
7
]
},
{
"start": [
2,
5,
6
],
"end": [
2,
5,
7
]
}
]
},
"summary": "Replaced the 'y' identifier with the 'd' identifier in the c[d] subscript access"
"summary": "Replaced the 'y' identifier with the 'd' identifier in the c[d] subscript access of the 'main' function"
}
]
},
@ -399,20 +221,21 @@
],
"patch": [
"diff --git a/go-and-defer-statements.go b/go-and-defer-statements.go",
"index bdc42aa..0cb11d5 100644",
"index 4eab499..0537c4b 100644",
"--- a/go-and-defer-statements.go",
"+++ b/go-and-defer-statements.go",
"@@ -1,5 +1,5 @@",
"@@ -1,6 +1,6 @@",
" package main",
" ",
" func main() {",
"-defer x.y()",
"-go x.y()",
"+defer a.b()",
"+go c.d()",
" defer x.y()",
" go x.y()",
" defer x.y()"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "e8853de747eee3ecdd93e3344be1e54dbc28e8fe..baf0c568b56a2909465365b10b1764e574ffdcbf"
"shas": "e741cd1a1870ca8aa2dbb3f1fa50acda13b26c7e..62f9c19e08627b73955cae9e8f40318f3cc07351"
}
,{
"testCaseDescription": "go-go-and-defer-statements-delete-replacement-test",
@ -421,93 +244,111 @@
"go-and-defer-statements.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
12
]
}
"replace": [
{
"start": [
4,
7
],
"end": [
4,
8
]
},
{
"start": [
4,
7
],
"end": [
4,
8
]
}
]
},
"summary": "Deleted the 'a[b]()' defer statement"
"summary": "Replaced the 'a' identifier with the 'x' identifier in the x[y] subscript access of the 'main' function"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
9
]
}
"replace": [
{
"start": [
4,
9
],
"end": [
4,
10
]
},
{
"start": [
4,
9
],
"end": [
4,
10
]
}
]
},
"summary": "Deleted the 'c[d]()' go statement"
"summary": "Replaced the 'b' identifier with the 'y' identifier in the x[y] subscript access of the 'main' function"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
3,
12
]
}
"replace": [
{
"start": [
5,
4
],
"end": [
5,
5
]
},
{
"start": [
5,
4
],
"end": [
5,
5
]
}
]
},
"summary": "Deleted the 'x[y]()' defer statement"
"summary": "Replaced the 'c' identifier with the 'x' identifier in the x[y] subscript access of the 'main' function"
},
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
9
]
}
"replace": [
{
"start": [
5,
6
],
"end": [
5,
7
]
},
{
"start": [
5,
6
],
"end": [
5,
7
]
}
]
},
"summary": "Deleted the 'x[y]()' go statement"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
12
]
}
},
"summary": "Added the 'a[b]()' defer statement"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
9
]
}
},
"summary": "Added the 'c[d]()' go statement"
"summary": "Replaced the 'd' identifier with the 'y' identifier in the x[y] subscript access of the 'main' function"
}
]
},
@ -518,24 +359,83 @@
],
"patch": [
"diff --git a/go-and-defer-statements.go b/go-and-defer-statements.go",
"index 0cb11d5..f18666e 100644",
"index 0537c4b..4eab499 100644",
"--- a/go-and-defer-statements.go",
"+++ b/go-and-defer-statements.go",
"@@ -1,6 +1,4 @@",
"@@ -1,6 +1,6 @@",
" package main",
" ",
" func main() {",
"-defer a.b()",
"-go c.d()",
"-defer x.y()",
"-go x.y()",
" defer x.y()",
" go x.y()",
"+defer a.b()",
"+go c.d()"
"+defer x.y()",
"+go x.y()",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "baf0c568b56a2909465365b10b1764e574ffdcbf..8449fd5df5a995e61d8ca8b450f83468e79a5246"
"shas": "62f9c19e08627b73955cae9e8f40318f3cc07351..163084e0ca6fe2785ad46e95ce64356d95e2ed92"
}
,{
"testCaseDescription": "go-go-and-defer-statements-delete-test",
"testCaseDescription": "go-go-and-defer-statements-delete-insert-test",
"expectedResult": {
"changes": {
"go-and-defer-statements.go": [
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
12
]
}
},
"summary": "Deleted the 'x[y]()' defer statement in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
5,
9
]
}
},
"summary": "Deleted the 'x[y]()' go statement in the main function of the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"go-and-defer-statements.go"
],
"patch": [
"diff --git a/go-and-defer-statements.go b/go-and-defer-statements.go",
"index 4eab499..7905807 100644",
"--- a/go-and-defer-statements.go",
"+++ b/go-and-defer-statements.go",
"@@ -1,6 +1,5 @@",
" package main",
" ",
" func main() {",
"-defer x.y()",
"-go x.y()",
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "163084e0ca6fe2785ad46e95ce64356d95e2ed92..0f6dc94819659d71e7ddea54da282fc29ce53a49"
}
,{
"testCaseDescription": "go-go-and-defer-statements-teardown-test",
"expectedResult": {
"changes": {
"go-and-defer-statements.go": [
@ -547,27 +447,12 @@
1
],
"end": [
1,
12
]
}
},
"summary": "Deleted the 'x[y]()' defer statement"
},
{
"span": {
"delete": {
"start": [
2,
6,
1
],
"end": [
2,
9
]
}
},
"summary": "Deleted the 'x[y]()' go statement"
"summary": "Deleted the 'main' module"
}
]
},
@ -578,69 +463,16 @@
],
"patch": [
"diff --git a/go-and-defer-statements.go b/go-and-defer-statements.go",
"index f18666e..eefd2e4 100644",
"index 7905807..e69de29 100644",
"--- a/go-and-defer-statements.go",
"+++ b/go-and-defer-statements.go",
"@@ -1,4 +1,2 @@",
"-defer x.y()",
"-go x.y()",
" defer a.b()",
" go c.d()"
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "8449fd5df5a995e61d8ca8b450f83468e79a5246..129278c1c54e5bcd112a0f7bc5a4876b0890b5a9"
}
,{
"testCaseDescription": "go-go-and-defer-statements-delete-rest-test",
"expectedResult": {
"changes": {
"go-and-defer-statements.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
12
]
}
},
"summary": "Deleted the 'a[b]()' defer statement"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
9
]
}
},
"summary": "Deleted the 'c[d]()' go statement"
}
]
},
"errors": {}
},
"filePaths": [
"go-and-defer-statements.go"
],
"patch": [
"diff --git a/go-and-defer-statements.go b/go-and-defer-statements.go",
"index eefd2e4..e69de29 100644",
"--- a/go-and-defer-statements.go",
"+++ b/go-and-defer-statements.go",
"@@ -1,2 +0,0 @@",
"-defer a.b()",
"-go c.d()"
],
"gitDir": "test/corpus/repos/go",
"shas": "129278c1c54e5bcd112a0f7bc5a4876b0890b5a9..13fa148e00739eba43f10562e024e15d2fc7e5d9"
"shas": "0f6dc94819659d71e7ddea54da282fc29ce53a49..62ff6615442be7bd2302df890296d069d758dc31"
}]

View File

@ -1,5 +1,5 @@
[{
"testCaseDescription": "go-grouped-import-declarations-insert-test",
"testCaseDescription": "go-grouped-import-declarations-setup-test",
"expectedResult": {
"changes": {
"grouped-import-declarations.go": [
@ -11,282 +11,12 @@
1
],
"end": [
5,
2
]
}
},
"summary": "Added the \"net/http\" import statement"
},
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
5,
2
]
}
},
"summary": "Added the \"some/dsl\" import statement"
}
]
},
"errors": {
"grouped-import-declarations.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
5,
2
]
}
},
"summary": "Added the 'import (\n\"net/http\"\n . \"some/dsl\"\n alias \"some/package\"\n)' at line 1, column 1 - line 5, column 2"
}
]
}
},
"filePaths": [
"grouped-import-declarations.go"
],
"patch": [
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
"index e69de29..6560136 100644",
"--- a/grouped-import-declarations.go",
"+++ b/grouped-import-declarations.go",
"@@ -0,0 +1,5 @@",
"+import (",
"+\"net/http\"",
"+ . \"some/dsl\"",
"+ alias \"some/package\"",
"+)"
],
"gitDir": "test/corpus/repos/go",
"shas": "3a1a004fc80ca40433336cc35ed31bd631b4d589..233d90c5a8f2097b27795d5e5e5eecc5c3415a31"
}
,{
"testCaseDescription": "go-grouped-import-declarations-replacement-insert-test",
"expectedResult": {
"changes": {
"grouped-import-declarations.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
5,
2
]
}
},
"summary": "Added the \"net/socket\" import statement"
},
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
5,
2
]
}
},
"summary": "Added the \"types/dsl\" import statement"
},
{
"span": {
"insert": {
"start": [
6,
1
],
"end": [
10,
2
]
}
},
"summary": "Added the \"net/http\" import statement"
},
{
"span": {
"insert": {
"start": [
6,
1
],
"end": [
10,
2
]
}
},
"summary": "Added the \"some/dsl\" import statement"
}
]
},
"errors": {
"grouped-import-declarations.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
5,
2
]
}
},
"summary": "Added the 'import (\n\"net/socket\"\n . \"types/dsl\"\n alias \"awesome/package\"\n)' at line 1, column 1 - line 5, column 2"
},
{
"span": {
"insert": {
"start": [
6,
1
],
"end": [
10,
2
]
}
},
"summary": "Added the 'import (\n\"net/http\"\n . \"some/dsl\"\n alias \"some/package\"\n)' at line 6, column 1 - line 10, column 2"
}
]
}
},
"filePaths": [
"grouped-import-declarations.go"
],
"patch": [
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
"index 6560136..31d6bd7 100644",
"--- a/grouped-import-declarations.go",
"+++ b/grouped-import-declarations.go",
"@@ -1,4 +1,14 @@",
" import (",
"+\"net/socket\"",
"+ . \"types/dsl\"",
"+ alias \"awesome/package\"",
"+)",
"+import (",
"+\"net/http\"",
"+ . \"some/dsl\"",
"+ alias \"some/package\"",
"+)",
"+import (",
" \"net/http\"",
" . \"some/dsl\"",
" alias \"some/package\""
],
"gitDir": "test/corpus/repos/go",
"shas": "233d90c5a8f2097b27795d5e5e5eecc5c3415a31..78e66d25bd964ed3c89453c89f7aaae054c874f0"
}
,{
"testCaseDescription": "go-grouped-import-declarations-delete-insert-test",
"expectedResult": {
"changes": {
"grouped-import-declarations.go": [
{
"span": {
"replace": [
{
"start": [
2,
1
],
"end": [
2,
13
]
},
{
"start": [
2,
1
],
"end": [
2,
11
]
}
]
},
"summary": "Replaced the \"net/socket\" string with the \"net/http\" string in the \"net/http\" import statement"
},
{
"span": {
"replace": [
{
"start": [
3,
5
],
"end": [
3,
16
]
},
{
"start": [
3,
5
],
"end": [
3,
15
]
}
]
},
"summary": "Replaced the \"types/dsl\" string with the \"some/dsl\" string in the \"some/dsl\" import statement"
},
{
"span": {
"replace": [
{
"start": [
4,
9
],
"end": [
4,
26
]
},
{
"start": [
4,
9
],
"end": [
4,
23
]
}
]
},
"summary": "Replaced the \"awesome/package\" string with the \"some/package\" string"
"summary": "Added the 'main' module"
}
]
},
@ -297,23 +27,65 @@
],
"patch": [
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
"index 31d6bd7..b045ab3 100644",
"index e69de29..7905807 100644",
"--- a/grouped-import-declarations.go",
"+++ b/grouped-import-declarations.go",
"@@ -1,7 +1,7 @@",
" import (",
"-\"net/socket\"",
"- . \"types/dsl\"",
"- alias \"awesome/package\"",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "e78b24c27343853f6335237e7d96a272a859a507..1a42069ce7810b592f1f05e8fbe113272bf389c0"
}
,{
"testCaseDescription": "go-grouped-import-declarations-insert-test",
"expectedResult": {
"changes": {},
"errors": {
"grouped-import-declarations.go": [
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
8,
2
]
}
},
"summary": "Added the 'import (\n\"net/http\"\n . \"some/dsl\"\n alias \"some/package\"\n)' at line 4, column 1 - line 8, column 2 in the main function of the 'main' module"
}
]
}
},
"filePaths": [
"grouped-import-declarations.go"
],
"patch": [
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
"index 7905807..b544dde 100644",
"--- a/grouped-import-declarations.go",
"+++ b/grouped-import-declarations.go",
"@@ -1,5 +1,9 @@",
" package main",
" ",
" func main() {",
"-",
"+import (",
"+\"net/http\"",
"+ . \"some/dsl\"",
"+ alias \"some/package\"",
" )",
" import (",
" \"net/http\""
"+)",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "78e66d25bd964ed3c89453c89f7aaae054c874f0..e37ef96d6ab2271602eb954f430703de6c409c55"
"shas": "1a42069ce7810b592f1f05e8fbe113272bf389c0..4c36b0099594a5d800f2683939c4dc3441b11b95"
}
,{
"testCaseDescription": "go-grouped-import-declarations-replacement-test",
@ -325,81 +97,81 @@
"replace": [
{
"start": [
2,
5,
1
],
"end": [
2,
5,
11
]
},
{
"start": [
2,
5,
1
],
"end": [
2,
5,
13
]
}
]
},
"summary": "Replaced the \"net/http\" string with the \"net/socket\" string in the \"net/socket\" import statement"
"summary": "Replaced the \"net/http\" string with the \"net/socket\" string in the main function of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
3,
6,
5
],
"end": [
3,
6,
15
]
},
{
"start": [
3,
6,
5
],
"end": [
3,
6,
16
]
}
]
},
"summary": "Replaced the \"some/dsl\" string with the \"types/dsl\" string in the \"types/dsl\" import statement"
"summary": "Replaced the \"some/dsl\" string with the \"types/dsl\" string in the main function of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
4,
7,
9
],
"end": [
4,
7,
23
]
},
{
"start": [
4,
7,
9
],
"end": [
4,
7,
26
]
}
]
},
"summary": "Replaced the \"some/package\" string with the \"awesome/package\" string"
"summary": "Replaced the \"some/package\" string with the \"awesome/package\" string in the main function of the 'main' module"
}
]
},
@ -410,10 +182,12 @@
],
"patch": [
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
"index b045ab3..31d6bd7 100644",
"index b544dde..1fd89e1 100644",
"--- a/grouped-import-declarations.go",
"+++ b/grouped-import-declarations.go",
"@@ -1,7 +1,7 @@",
"@@ -2,8 +2,8 @@ package main",
" ",
" func main() {",
" import (",
"-\"net/http\"",
"- . \"some/dsl\"",
@ -422,11 +196,10 @@
"+ . \"types/dsl\"",
"+ alias \"awesome/package\"",
" )",
" import (",
" \"net/http\""
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "e37ef96d6ab2271602eb954f430703de6c409c55..90f9553085893a3d87bd9797f65d3083643431c4"
"shas": "4c36b0099594a5d800f2683939c4dc3441b11b95..9a368ebd9cf5a427e32365d25a2eefd0f52b9165"
}
,{
"testCaseDescription": "go-grouped-import-declarations-delete-replacement-test",
@ -435,230 +208,133 @@
"grouped-import-declarations.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
5,
2
]
}
"replace": [
{
"start": [
5,
1
],
"end": [
5,
13
]
},
{
"start": [
5,
1
],
"end": [
5,
11
]
}
]
},
"summary": "Deleted the \"net/socket\" import statement"
"summary": "Replaced the \"net/socket\" string with the \"net/http\" string in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
5,
2
]
}
"replace": [
{
"start": [
6,
5
],
"end": [
6,
16
]
},
{
"start": [
6,
5
],
"end": [
6,
15
]
}
]
},
"summary": "Deleted the \"types/dsl\" import statement"
"summary": "Replaced the \"types/dsl\" string with the \"some/dsl\" string in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
6,
1
],
"end": [
10,
2
]
}
"replace": [
{
"start": [
7,
9
],
"end": [
7,
26
]
},
{
"start": [
7,
9
],
"end": [
7,
23
]
}
]
},
"summary": "Deleted the \"net/http\" import statement"
},
{
"span": {
"delete": {
"start": [
6,
1
],
"end": [
10,
2
]
}
},
"summary": "Deleted the \"some/dsl\" import statement"
},
{
"span": {
"insert": {
"start": [
6,
1
],
"end": [
10,
2
]
}
},
"summary": "Added the \"net/socket\" import statement"
},
{
"span": {
"insert": {
"start": [
6,
1
],
"end": [
10,
2
]
}
},
"summary": "Added the \"types/dsl\" import statement"
"summary": "Replaced the \"awesome/package\" string with the \"some/package\" string in the main function of the 'main' module"
}
]
},
"errors": {
"grouped-import-declarations.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
5,
2
]
}
},
"summary": "Deleted the 'import (\n\"net/socket\"\n . \"types/dsl\"\n alias \"awesome/package\"\n)' at line 1, column 1 - line 5, column 2"
},
{
"span": {
"delete": {
"start": [
6,
1
],
"end": [
10,
2
]
}
},
"summary": "Deleted the 'import (\n\"net/http\"\n . \"some/dsl\"\n alias \"some/package\"\n)' at line 6, column 1 - line 10, column 2"
},
{
"span": {
"insert": {
"start": [
6,
1
],
"end": [
10,
2
]
}
},
"summary": "Added the 'import (\n\"net/socket\"\n . \"types/dsl\"\n alias \"awesome/package\"\n)' at line 6, column 1 - line 10, column 2"
}
]
}
"errors": {}
},
"filePaths": [
"grouped-import-declarations.go"
],
"patch": [
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
"index 31d6bd7..62facc6 100644",
"index 1fd89e1..b544dde 100644",
"--- a/grouped-import-declarations.go",
"+++ b/grouped-import-declarations.go",
"@@ -1,15 +1,10 @@",
"@@ -2,8 +2,8 @@ package main",
" ",
" func main() {",
" import (",
"-\"net/socket\"",
"- . \"types/dsl\"",
"- alias \"awesome/package\"",
"-)",
"-import (",
" \"net/http\"",
" . \"some/dsl\"",
" alias \"some/package\"",
"+\"net/http\"",
"+ . \"some/dsl\"",
"+ alias \"some/package\"",
" )",
" import (",
"-\"net/http\"",
"- . \"some/dsl\"",
"- alias \"some/package\"",
"+\"net/socket\"",
"+ . \"types/dsl\"",
"+ alias \"awesome/package\"",
" )"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "90f9553085893a3d87bd9797f65d3083643431c4..5ea9646b5663b469d1d05d122fc573b0bbf249b6"
"shas": "9a368ebd9cf5a427e32365d25a2eefd0f52b9165..3775bb28d70f602623389ec24321e9e1702df09a"
}
,{
"testCaseDescription": "go-grouped-import-declarations-delete-test",
"testCaseDescription": "go-grouped-import-declarations-delete-insert-test",
"expectedResult": {
"changes": {
"grouped-import-declarations.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
5,
2
]
}
},
"summary": "Deleted the \"net/http\" import statement"
},
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
5,
2
]
}
},
"summary": "Deleted the \"some/dsl\" import statement"
}
]
},
"changes": {},
"errors": {
"grouped-import-declarations.go": [
{
"span": {
"delete": {
"start": [
1,
4,
1
],
"end": [
5,
8,
2
]
}
},
"summary": "Deleted the 'import (\n\"net/http\"\n . \"some/dsl\"\n alias \"some/package\"\n)' at line 1, column 1 - line 5, column 2"
"summary": "Deleted the 'import (\n\"net/http\"\n . \"some/dsl\"\n alias \"some/package\"\n)' at line 4, column 1 - line 8, column 2 in the main function of the 'main' module"
}
]
}
@ -668,25 +344,26 @@
],
"patch": [
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
"index 62facc6..e2f9293 100644",
"index b544dde..7905807 100644",
"--- a/grouped-import-declarations.go",
"+++ b/grouped-import-declarations.go",
"@@ -1,9 +1,4 @@",
" import (",
"@@ -1,9 +1,5 @@",
" package main",
" ",
" func main() {",
"-import (",
"-\"net/http\"",
"- . \"some/dsl\"",
"- alias \"some/package\"",
"-)",
"-import (",
" \"net/socket\"",
" . \"types/dsl\"",
" alias \"awesome/package\""
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "5ea9646b5663b469d1d05d122fc573b0bbf249b6..03ae54522feab408ae78aabc67aa66fb1bbd9e5d"
"shas": "3775bb28d70f602623389ec24321e9e1702df09a..5213533c355a20202a3e66fd51ae30ced695d2d8"
}
,{
"testCaseDescription": "go-grouped-import-declarations-delete-rest-test",
"testCaseDescription": "go-grouped-import-declarations-teardown-test",
"expectedResult": {
"changes": {
"grouped-import-declarations.go": [
@ -698,65 +375,32 @@
1
],
"end": [
5,
2
]
}
},
"summary": "Deleted the \"net/socket\" import statement"
},
{
"span": {
"delete": {
"start": [
1,
6,
1
],
"end": [
5,
2
]
}
},
"summary": "Deleted the \"types/dsl\" import statement"
"summary": "Deleted the 'main' module"
}
]
},
"errors": {
"grouped-import-declarations.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
5,
2
]
}
},
"summary": "Deleted the 'import (\n\"net/socket\"\n . \"types/dsl\"\n alias \"awesome/package\"\n)' at line 1, column 1 - line 5, column 2"
}
]
}
"errors": {}
},
"filePaths": [
"grouped-import-declarations.go"
],
"patch": [
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
"index e2f9293..e69de29 100644",
"index 7905807..e69de29 100644",
"--- a/grouped-import-declarations.go",
"+++ b/grouped-import-declarations.go",
"@@ -1,5 +0,0 @@",
"-import (",
"-\"net/socket\"",
"- . \"types/dsl\"",
"- alias \"awesome/package\"",
"-)"
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "03ae54522feab408ae78aabc67aa66fb1bbd9e5d..f506441da93c9b84b48df54338a1c9a9314a3f6b"
"shas": "5213533c355a20202a3e66fd51ae30ced695d2d8..f3e05e09e3d530af1ff259250ef56340ddb2a62b"
}]

View File

@ -1,4 +1,46 @@
[{
"testCaseDescription": "go-grouped-var-declarations-setup-test",
"expectedResult": {
"changes": {
"grouped-var-declarations.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"grouped-var-declarations.go"
],
"patch": [
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
"index e69de29..7905807 100644",
"--- a/grouped-var-declarations.go",
"+++ b/grouped-var-declarations.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "53a6ccc76bdca521d59dba54f74e108a96e2ec04..86f93da269d32d85d2f9b108c34b163fbbbf9839"
}
,{
"testCaseDescription": "go-grouped-var-declarations-insert-test",
"expectedResult": {
"changes": {
@ -7,31 +49,31 @@
"span": {
"insert": {
"start": [
1,
4,
1
],
"end": [
4,
7,
2
]
}
},
"summary": "Added the 'zero' variable"
"summary": "Added the 'zero' variable in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
1,
4,
1
],
"end": [
4,
7,
2
]
}
},
"summary": "Added the 'one' variable"
"summary": "Added the 'one' variable in the main function of the 'main' module"
}
]
},
@ -42,195 +84,22 @@
],
"patch": [
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
"index e69de29..c1c0b16 100644",
"index 7905807..cdb45b3 100644",
"--- a/grouped-var-declarations.go",
"+++ b/grouped-var-declarations.go",
"@@ -0,0 +1,4 @@",
"+var (",
"+zero = 0",
"+one = 1",
"+)"
],
"gitDir": "test/corpus/repos/go",
"shas": "87119afd9d847041735cf640ecc066ad2804a85f..3d2221718774634aaf05f9751f1eac96639c8867"
}
,{
"testCaseDescription": "go-grouped-var-declarations-replacement-insert-test",
"expectedResult": {
"changes": {
"grouped-var-declarations.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
4,
2
]
}
},
"summary": "Added the 'a' variable"
},
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
4,
2
]
}
},
"summary": "Added the 'b' variable"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
8,
2
]
}
},
"summary": "Added the 'zero' variable"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
8,
2
]
}
},
"summary": "Added the 'one' variable"
}
]
},
"errors": {}
},
"filePaths": [
"grouped-var-declarations.go"
],
"patch": [
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
"index c1c0b16..6b9c91d 100644",
"--- a/grouped-var-declarations.go",
"+++ b/grouped-var-declarations.go",
"@@ -1,4 +1,12 @@",
" var (",
"+a = 0",
"+b = 1",
"+)",
"@@ -1,5 +1,8 @@",
" package main",
" ",
" func main() {",
"-",
"+var (",
"+zero = 0",
"+one = 1",
"+)",
"+var (",
" zero = 0",
" one = 1",
" )"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "3d2221718774634aaf05f9751f1eac96639c8867..028abd80df67d44f7cd18c889e31248c955453ae"
}
,{
"testCaseDescription": "go-grouped-var-declarations-delete-insert-test",
"expectedResult": {
"changes": {
"grouped-var-declarations.go": [
{
"span": {
"replace": [
{
"start": [
2,
1
],
"end": [
2,
2
]
},
{
"start": [
2,
1
],
"end": [
2,
5
]
}
]
},
"summary": "Replaced the 'a' identifier with the 'zero' identifier in the zero variable"
},
{
"span": {
"replace": [
{
"start": [
3,
1
],
"end": [
3,
2
]
},
{
"start": [
3,
1
],
"end": [
3,
4
]
}
]
},
"summary": "Replaced the 'b' identifier with the 'one' identifier in the one variable"
}
]
},
"errors": {}
},
"filePaths": [
"grouped-var-declarations.go"
],
"patch": [
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
"index 6b9c91d..5ed0e06 100644",
"--- a/grouped-var-declarations.go",
"+++ b/grouped-var-declarations.go",
"@@ -1,6 +1,6 @@",
" var (",
"-a = 0",
"-b = 1",
"+zero = 0",
"+one = 1",
" )",
" var (",
" zero = 0"
],
"gitDir": "test/corpus/repos/go",
"shas": "028abd80df67d44f7cd18c889e31248c955453ae..25b8fae28eebfaaa5e88a04d68b10205a277ed91"
"shas": "86f93da269d32d85d2f9b108c34b163fbbbf9839..0874c2a15a17dcec19ca343525d086fa9bba3fcc"
}
,{
"testCaseDescription": "go-grouped-var-declarations-replacement-test",
@ -242,54 +111,54 @@
"replace": [
{
"start": [
2,
5,
1
],
"end": [
2,
5,
5
]
},
{
"start": [
2,
5,
1
],
"end": [
2,
5,
2
]
}
]
},
"summary": "Replaced the 'zero' identifier with the 'a' identifier in the a variable"
"summary": "Replaced the 'zero' identifier with the 'a' identifier in the a variable of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
3,
6,
1
],
"end": [
3,
6,
4
]
},
{
"start": [
3,
6,
1
],
"end": [
3,
6,
2
]
}
]
},
"summary": "Replaced the 'one' identifier with the 'b' identifier in the b variable"
"summary": "Replaced the 'one' identifier with the 'b' identifier in the b variable of the 'main' function"
}
]
},
@ -300,21 +169,22 @@
],
"patch": [
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
"index 5ed0e06..6b9c91d 100644",
"index cdb45b3..806a593 100644",
"--- a/grouped-var-declarations.go",
"+++ b/grouped-var-declarations.go",
"@@ -1,6 +1,6 @@",
"@@ -2,7 +2,7 @@ package main",
" ",
" func main() {",
" var (",
"-zero = 0",
"-one = 1",
"+a = 0",
"+b = 1",
" )",
" var (",
" zero = 0"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "25b8fae28eebfaaa5e88a04d68b10205a277ed91..34a449a972a1a710b5cd14ca0c174c15dcaeb003"
"shas": "0874c2a15a17dcec19ca343525d086fa9bba3fcc..8073880fd2d7831dc3dbbeb9db623a0bfcf0549b"
}
,{
"testCaseDescription": "go-grouped-var-declarations-delete-replacement-test",
@ -323,93 +193,57 @@
"grouped-var-declarations.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
4,
2
]
}
"replace": [
{
"start": [
5,
1
],
"end": [
5,
2
]
},
{
"start": [
5,
1
],
"end": [
5,
5
]
}
]
},
"summary": "Deleted the 'a' variable"
"summary": "Replaced the 'a' identifier with the 'zero' identifier in the zero variable of the 'main' function"
},
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
4,
2
]
}
"replace": [
{
"start": [
6,
1
],
"end": [
6,
2
]
},
{
"start": [
6,
1
],
"end": [
6,
4
]
}
]
},
"summary": "Deleted the 'b' variable"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
8,
2
]
}
},
"summary": "Deleted the 'zero' variable"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
8,
2
]
}
},
"summary": "Deleted the 'one' variable"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
8,
2
]
}
},
"summary": "Added the 'a' variable"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
8,
2
]
}
},
"summary": "Added the 'b' variable"
"summary": "Replaced the 'b' identifier with the 'one' identifier in the one variable of the 'main' function"
}
]
},
@ -420,30 +254,25 @@
],
"patch": [
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
"index 6b9c91d..9094e82 100644",
"index 806a593..cdb45b3 100644",
"--- a/grouped-var-declarations.go",
"+++ b/grouped-var-declarations.go",
"@@ -1,12 +1,8 @@",
"@@ -2,7 +2,7 @@ package main",
" ",
" func main() {",
" var (",
"-a = 0",
"-b = 1",
"-)",
"-var (",
" zero = 0",
" one = 1",
"+zero = 0",
"+one = 1",
" )",
" var (",
"-zero = 0",
"-one = 1",
"+a = 0",
"+b = 1",
" )"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "34a449a972a1a710b5cd14ca0c174c15dcaeb003..513b36b7a4797c5c95576f1bdcfe5c3aff699138"
"shas": "8073880fd2d7831dc3dbbeb9db623a0bfcf0549b..68021e5d1ff636493c41230156f7a09a3e23bd71"
}
,{
"testCaseDescription": "go-grouped-var-declarations-delete-test",
"testCaseDescription": "go-grouped-var-declarations-delete-insert-test",
"expectedResult": {
"changes": {
"grouped-var-declarations.go": [
@ -451,31 +280,31 @@
"span": {
"delete": {
"start": [
1,
4,
1
],
"end": [
4,
7,
2
]
}
},
"summary": "Deleted the 'zero' variable"
"summary": "Deleted the 'zero' variable in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
1,
4,
1
],
"end": [
4,
7,
2
]
}
},
"summary": "Deleted the 'one' variable"
"summary": "Deleted the 'one' variable in the main function of the 'main' module"
}
]
},
@ -486,24 +315,25 @@
],
"patch": [
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
"index 9094e82..d954576 100644",
"index cdb45b3..7905807 100644",
"--- a/grouped-var-declarations.go",
"+++ b/grouped-var-declarations.go",
"@@ -1,8 +1,4 @@",
" var (",
"@@ -1,8 +1,5 @@",
" package main",
" ",
" func main() {",
"-var (",
"-zero = 0",
"-one = 1",
"-)",
"-var (",
" a = 0",
" b = 1",
" )"
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "513b36b7a4797c5c95576f1bdcfe5c3aff699138..b9336abbeeb3b7e8e18bd0757837c28f3d1b41e1"
"shas": "68021e5d1ff636493c41230156f7a09a3e23bd71..7f7f027be1bfb00c50d36a923d85c2db5c7f2400"
}
,{
"testCaseDescription": "go-grouped-var-declarations-delete-rest-test",
"testCaseDescription": "go-grouped-var-declarations-teardown-test",
"expectedResult": {
"changes": {
"grouped-var-declarations.go": [
@ -515,27 +345,12 @@
1
],
"end": [
4,
2
]
}
},
"summary": "Deleted the 'a' variable"
},
{
"span": {
"delete": {
"start": [
1,
6,
1
],
"end": [
4,
2
]
}
},
"summary": "Deleted the 'b' variable"
"summary": "Deleted the 'main' module"
}
]
},
@ -546,15 +361,16 @@
],
"patch": [
"diff --git a/grouped-var-declarations.go b/grouped-var-declarations.go",
"index d954576..e69de29 100644",
"index 7905807..e69de29 100644",
"--- a/grouped-var-declarations.go",
"+++ b/grouped-var-declarations.go",
"@@ -1,4 +0,0 @@",
"-var (",
"-a = 0",
"-b = 1",
"-)"
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "b9336abbeeb3b7e8e18bd0757837c28f3d1b41e1..25238a93bb3b92d4e2609c44f320e44fd9f4b537"
"shas": "7f7f027be1bfb00c50d36a923d85c2db5c7f2400..4366e644d8418699b83785526961663dccfe411a"
}]

View File

@ -1,23 +1,50 @@
[{
"testCaseDescription": "go-if-statements-setup-test",
"expectedResult": {
"changes": {
"if-statements.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"if-statements.go"
],
"patch": [
"diff --git a/if-statements.go b/if-statements.go",
"index e69de29..7905807 100644",
"--- a/if-statements.go",
"+++ b/if-statements.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "98a6dc74cc5a66c1d0c8f0d36bd0e08d21121e35..a7060305357a85db1db00a13648871f897f813f6"
}
,{
"testCaseDescription": "go-if-statements-insert-test",
"expectedResult": {
"changes": {
"if-statements.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
3,
2
]
}
},
"summary": "Added the 'a()' if statement"
},
{
"span": {
"insert": {
@ -31,7 +58,7 @@
]
}
},
"summary": "Added the 'a := b(); c' if statement"
"summary": "Added the 'a()' if statement in the main function of the 'main' module"
},
{
"span": {
@ -41,96 +68,18 @@
1
],
"end": [
11,
9,
2
]
}
},
"summary": "Added the 'a()' if statement"
}
]
},
"errors": {}
},
"filePaths": [
"if-statements.go"
],
"patch": [
"diff --git a/if-statements.go b/if-statements.go",
"index e69de29..2266b8b 100644",
"--- a/if-statements.go",
"+++ b/if-statements.go",
"@@ -0,0 +1,11 @@",
"+if a() {",
"+b()",
"+}",
"+if a := b(); c {",
"+d()",
"+}",
"+if a() {",
"+b()",
"+} else {",
"+c()",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "4f9b8528a927a98cae35aa92a05bab432d2cf451..75f23c99193596d8ea69b9866cd03216408717d4"
}
,{
"testCaseDescription": "go-if-statements-replacement-insert-test",
"expectedResult": {
"changes": {
"if-statements.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
3,
2
]
}
},
"summary": "Added the 'x()' if statement"
"summary": "Added the 'a := b(); c' if statement in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
6,
2
]
}
},
"summary": "Added the 'y := b(); c' if statement"
},
{
"span": {
"insert": {
"start": [
7,
1
],
"end": [
11,
2
]
}
},
"summary": "Added the 'z()' if statement"
},
{
"span": {
"insert": {
"start": [
12,
10,
1
],
"end": [
@ -139,37 +88,7 @@
]
}
},
"summary": "Added the 'a()' if statement"
},
{
"span": {
"insert": {
"start": [
15,
1
],
"end": [
17,
2
]
}
},
"summary": "Added the 'a := b(); c' if statement"
},
{
"span": {
"insert": {
"start": [
18,
1
],
"end": [
22,
2
]
}
},
"summary": "Added the 'a()' if statement"
"summary": "Added the 'a()' if statement in the main function of the 'main' module"
}
]
},
@ -180,21 +99,14 @@
],
"patch": [
"diff --git a/if-statements.go b/if-statements.go",
"index 2266b8b..abacd6e 100644",
"index 7905807..76a6f33 100644",
"--- a/if-statements.go",
"+++ b/if-statements.go",
"@@ -1,3 +1,25 @@",
"+if x() {",
"+b()",
"+}",
"+if y := b(); c {",
"+d()",
"+}",
"+if z() {",
"+b()",
"+} else {",
"+c()",
"+}",
"@@ -1,5 +1,15 @@",
" package main",
" ",
" func main() {",
"-",
"+if a() {",
"+b()",
"+}",
@ -206,161 +118,16 @@
"+} else {",
"+c()",
"+}",
" if a() {",
" b()",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "75f23c99193596d8ea69b9866cd03216408717d4..669deded061b62b8d693268ec8535244bc3aeed8"
}
,{
"testCaseDescription": "go-if-statements-delete-insert-test",
"expectedResult": {
"changes": {
"if-statements.go": [
{
"span": {
"replace": [
{
"start": [
1,
4
],
"end": [
1,
5
]
},
{
"start": [
1,
4
],
"end": [
1,
5
]
}
]
},
"summary": "Replaced the 'x' identifier with the 'a' identifier in the a() function call"
},
{
"span": {
"replace": [
{
"start": [
4,
4
],
"end": [
4,
5
]
},
{
"start": [
4,
4
],
"end": [
4,
5
]
}
]
},
"summary": "Replaced the 'y' identifier with the 'a' identifier in the a variable"
},
{
"span": {
"replace": [
{
"start": [
7,
4
],
"end": [
7,
5
]
},
{
"start": [
7,
4
],
"end": [
7,
5
]
}
]
},
"summary": "Replaced the 'z' identifier with the 'a' identifier in the a() function call"
}
]
},
"errors": {}
},
"filePaths": [
"if-statements.go"
],
"patch": [
"diff --git a/if-statements.go b/if-statements.go",
"index abacd6e..b5fd21a 100644",
"--- a/if-statements.go",
"+++ b/if-statements.go",
"@@ -1,10 +1,10 @@",
"-if x() {",
"+if a() {",
" b()",
" }",
"-if y := b(); c {",
"+if a := b(); c {",
" d()",
" }",
"-if z() {",
"+if a() {",
" b()",
" } else {",
" c()"
],
"gitDir": "test/corpus/repos/go",
"shas": "669deded061b62b8d693268ec8535244bc3aeed8..0ab3ed7afc3476fc761770f35bf7697971a2f839"
"shas": "a7060305357a85db1db00a13648871f897f813f6..aad8fd0302081ecdf38c3845a4c53c714e31b7de"
}
,{
"testCaseDescription": "go-if-statements-replacement-test",
"expectedResult": {
"changes": {
"if-statements.go": [
{
"span": {
"replace": [
{
"start": [
1,
4
],
"end": [
1,
5
]
},
{
"start": [
1,
4
],
"end": [
1,
5
]
}
]
},
"summary": "Replaced the 'a' identifier with the 'x' identifier in the x() function call"
},
{
"span": {
"replace": [
@ -386,7 +153,7 @@
}
]
},
"summary": "Replaced the 'a' identifier with the 'y' identifier in the y variable"
"summary": "Replaced the 'a' identifier with the 'x' identifier in the x() function call of the 'main' function"
},
{
"span": {
@ -413,7 +180,34 @@
}
]
},
"summary": "Replaced the 'a' identifier with the 'z' identifier in the z() function call"
"summary": "Replaced the 'a' identifier with the 'y' identifier in the y variable of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
10,
4
],
"end": [
10,
5
]
},
{
"start": [
10,
4
],
"end": [
10,
5
]
}
]
},
"summary": "Replaced the 'a' identifier with the 'z' identifier in the z() function call of the 'main' function"
}
]
},
@ -424,10 +218,13 @@
],
"patch": [
"diff --git a/if-statements.go b/if-statements.go",
"index b5fd21a..abacd6e 100644",
"index 76a6f33..39dfc0d 100644",
"--- a/if-statements.go",
"+++ b/if-statements.go",
"@@ -1,10 +1,10 @@",
"@@ -1,13 +1,13 @@",
" package main",
" ",
" func main() {",
"-if a() {",
"+if x() {",
" b()",
@ -443,7 +240,7 @@
" c()"
],
"gitDir": "test/corpus/repos/go",
"shas": "0ab3ed7afc3476fc761770f35bf7697971a2f839..2f24dc9616440294210032ea90d1869e7b39cc8c"
"shas": "aad8fd0302081ecdf38c3845a4c53c714e31b7de..14aa0cf6c4b9326e486eb39ba7d6744743717cd1"
}
,{
"testCaseDescription": "go-if-statements-delete-replacement-test",
@ -452,138 +249,84 @@
"if-statements.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
3,
2
]
}
"replace": [
{
"start": [
4,
4
],
"end": [
4,
5
]
},
{
"start": [
4,
4
],
"end": [
4,
5
]
}
]
},
"summary": "Deleted the 'x()' if statement"
"summary": "Replaced the 'x' identifier with the 'a' identifier in the a() function call of the 'main' function"
},
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
6,
2
]
}
"replace": [
{
"start": [
7,
4
],
"end": [
7,
5
]
},
{
"start": [
7,
4
],
"end": [
7,
5
]
}
]
},
"summary": "Deleted the 'y := b(); c' if statement"
"summary": "Replaced the 'y' identifier with the 'a' identifier in the a variable of the 'main' function"
},
{
"span": {
"delete": {
"start": [
7,
1
],
"end": [
11,
2
]
}
"replace": [
{
"start": [
10,
4
],
"end": [
10,
5
]
},
{
"start": [
10,
4
],
"end": [
10,
5
]
}
]
},
"summary": "Deleted the 'z()' if statement"
},
{
"span": {
"delete": {
"start": [
12,
1
],
"end": [
14,
2
]
}
},
"summary": "Deleted the 'a()' if statement"
},
{
"span": {
"delete": {
"start": [
15,
1
],
"end": [
17,
2
]
}
},
"summary": "Deleted the 'a := b(); c' if statement"
},
{
"span": {
"delete": {
"start": [
18,
1
],
"end": [
22,
2
]
}
},
"summary": "Deleted the 'a()' if statement"
},
{
"span": {
"insert": {
"start": [
12,
1
],
"end": [
14,
2
]
}
},
"summary": "Added the 'x()' if statement"
},
{
"span": {
"insert": {
"start": [
15,
1
],
"end": [
17,
2
]
}
},
"summary": "Added the 'y := b(); c' if statement"
},
{
"span": {
"insert": {
"start": [
18,
1
],
"end": [
22,
2
]
}
},
"summary": "Added the 'z()' if statement"
"summary": "Replaced the 'z' identifier with the 'a' identifier in the a() function call of the 'main' function"
}
]
},
@ -594,65 +337,35 @@
],
"patch": [
"diff --git a/if-statements.go b/if-statements.go",
"index abacd6e..ccb09fd 100644",
"index 39dfc0d..76a6f33 100644",
"--- a/if-statements.go",
"+++ b/if-statements.go",
"@@ -1,14 +1,3 @@",
"@@ -1,13 +1,13 @@",
" package main",
" ",
" func main() {",
"-if x() {",
"-b()",
"-}",
"+if a() {",
" b()",
" }",
"-if y := b(); c {",
"-d()",
"-}",
"-if z() {",
"-b()",
"-} else {",
"-c()",
"-}",
" if a() {",
" b()",
" }",
"@@ -20,13 +9,13 @@ b()",
" } else {",
" c()",
" }",
"-if a() {",
"+if x() {",
" b()",
" }",
"-if a := b(); c {",
"+if y := b(); c {",
"+if a := b(); c {",
" d()",
" }",
"-if a() {",
"+if z() {",
"-if z() {",
"+if a() {",
" b()",
" } else {",
" c()"
],
"gitDir": "test/corpus/repos/go",
"shas": "2f24dc9616440294210032ea90d1869e7b39cc8c..dd27d3e8d9917d7970125a0e771840a3a352768d"
"shas": "14aa0cf6c4b9326e486eb39ba7d6744743717cd1..79e7dd408610f628f188e125563ef488ca21fbb0"
}
,{
"testCaseDescription": "go-if-statements-delete-test",
"testCaseDescription": "go-if-statements-delete-insert-test",
"expectedResult": {
"changes": {
"if-statements.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
3,
2
]
}
},
"summary": "Deleted the 'a()' if statement"
},
{
"span": {
"delete": {
@ -666,7 +379,7 @@
]
}
},
"summary": "Deleted the 'a := b(); c' if statement"
"summary": "Deleted the 'a()' if statement in the main function of the 'main' module"
},
{
"span": {
@ -676,12 +389,27 @@
1
],
"end": [
11,
9,
2
]
}
},
"summary": "Deleted the 'a()' if statement"
"summary": "Deleted the 'a := b(); c' if statement in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
10,
1
],
"end": [
14,
2
]
}
},
"summary": "Deleted the 'a()' if statement in the main function of the 'main' module"
}
]
},
@ -692,10 +420,13 @@
],
"patch": [
"diff --git a/if-statements.go b/if-statements.go",
"index ccb09fd..2e63573 100644",
"index 76a6f33..7905807 100644",
"--- a/if-statements.go",
"+++ b/if-statements.go",
"@@ -1,14 +1,3 @@",
"@@ -1,15 +1,5 @@",
" package main",
" ",
" func main() {",
"-if a() {",
"-b()",
"-}",
@ -707,15 +438,14 @@
"-} else {",
"-c()",
"-}",
" if x() {",
" b()",
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "dd27d3e8d9917d7970125a0e771840a3a352768d..1559b8975147717c1d7eb9ae330d6bd4dbc18702"
"shas": "79e7dd408610f628f188e125563ef488ca21fbb0..d3ae344d983e764cd814dbc2e9576237ca16027a"
}
,{
"testCaseDescription": "go-if-statements-delete-rest-test",
"testCaseDescription": "go-if-statements-teardown-test",
"expectedResult": {
"changes": {
"if-statements.go": [
@ -726,43 +456,13 @@
1,
1
],
"end": [
3,
2
]
}
},
"summary": "Deleted the 'x()' if statement"
},
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
6,
2
]
}
},
"summary": "Deleted the 'y := b(); c' if statement"
},
{
"span": {
"delete": {
"start": [
7,
1
],
"end": [
11,
2
]
}
},
"summary": "Deleted the 'z()' if statement"
"summary": "Deleted the 'main' module"
}
]
},
@ -773,22 +473,16 @@
],
"patch": [
"diff --git a/if-statements.go b/if-statements.go",
"index 2e63573..e69de29 100644",
"index 7905807..e69de29 100644",
"--- a/if-statements.go",
"+++ b/if-statements.go",
"@@ -1,11 +0,0 @@",
"-if x() {",
"-b()",
"-}",
"-if y := b(); c {",
"-d()",
"-}",
"-if z() {",
"-b()",
"-} else {",
"-c()",
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "1559b8975147717c1d7eb9ae330d6bd4dbc18702..d77b70cb3981afaf807f3e56652ecd386101cb2b"
"shas": "d3ae344d983e764cd814dbc2e9576237ca16027a..c15f3eb2a6003ef78012d02db50d2926c02e07b0"
}]

View File

@ -1,40 +1,49 @@
[{
"testCaseDescription": "go-imaginary-literals-setup-test",
"expectedResult": {
"changes": {
"imaginary-literals.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"imaginary-literals.go"
],
"patch": [
"diff --git a/imaginary-literals.go b/imaginary-literals.go",
"index e69de29..7905807 100644",
"--- a/imaginary-literals.go",
"+++ b/imaginary-literals.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "08f6651cadd919c4daa0e50e7692fd79fd4f174a..058ac07a0f3562f11831ab26625123ab5766e1e6"
}
,{
"testCaseDescription": "go-imaginary-literals-insert-test",
"expectedResult": {
"changes": {
"imaginary-literals.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
4,
2
]
}
},
"summary": "Added the 'a' variable"
},
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
4,
2
]
}
},
"summary": "Added the 'b' variable"
}
]
},
"changes": {},
"errors": {}
},
"filePaths": [
@ -42,257 +51,27 @@
],
"patch": [
"diff --git a/imaginary-literals.go b/imaginary-literals.go",
"index e69de29..aca2d55 100644",
"index 7905807..25a97da 100644",
"--- a/imaginary-literals.go",
"+++ b/imaginary-literals.go",
"@@ -0,0 +1,4 @@",
"+const (",
"+a = 01i",
"+b = 1.e+100i",
"+)"
],
"gitDir": "test/corpus/repos/go",
"shas": "9fd880a1842d8c0b0096899be831486a006f50e4..1dfc4de50a79b596b883a8c32478aed48332a96b"
}
,{
"testCaseDescription": "go-imaginary-literals-replacement-insert-test",
"expectedResult": {
"changes": {
"imaginary-literals.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
4,
2
]
}
},
"summary": "Added the 'a' variable"
},
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
4,
2
]
}
},
"summary": "Added the 'b' variable"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
8,
2
]
}
},
"summary": "Added the 'a' variable"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
8,
2
]
}
},
"summary": "Added the 'b' variable"
}
]
},
"errors": {}
},
"filePaths": [
"imaginary-literals.go"
],
"patch": [
"diff --git a/imaginary-literals.go b/imaginary-literals.go",
"index aca2d55..6983988 100644",
"--- a/imaginary-literals.go",
"+++ b/imaginary-literals.go",
"@@ -1,4 +1,12 @@",
" const (",
"+a = 02i",
"+b = 1.e+103i",
"+)",
"@@ -1,5 +1,8 @@",
" package main",
" ",
" func main() {",
"-",
"+const (",
"+a = 01i",
"+b = 1.e+100i",
"+)",
"+const (",
" a = 01i",
" b = 1.e+100i",
" )"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "1dfc4de50a79b596b883a8c32478aed48332a96b..22a5dcc7eb910c4be07e0d79c4010014c87b9a45"
}
,{
"testCaseDescription": "go-imaginary-literals-delete-insert-test",
"expectedResult": {
"changes": {
"imaginary-literals.go": [
{
"span": {
"replace": [
{
"start": [
2,
5
],
"end": [
2,
8
]
},
{
"start": [
2,
5
],
"end": [
2,
8
]
}
]
},
"summary": "Replaced the '02i' imaginary_literal with the '01i' imaginary_literal in the a variable"
},
{
"span": {
"replace": [
{
"start": [
3,
5
],
"end": [
3,
13
]
},
{
"start": [
3,
5
],
"end": [
3,
13
]
}
]
},
"summary": "Replaced the '1.e+103i' imaginary_literal with the '1.e+100i' imaginary_literal in the b variable"
}
]
},
"errors": {}
},
"filePaths": [
"imaginary-literals.go"
],
"patch": [
"diff --git a/imaginary-literals.go b/imaginary-literals.go",
"index 6983988..a7e36a5 100644",
"--- a/imaginary-literals.go",
"+++ b/imaginary-literals.go",
"@@ -1,6 +1,6 @@",
" const (",
"-a = 02i",
"-b = 1.e+103i",
"+a = 01i",
"+b = 1.e+100i",
" )",
" const (",
" a = 01i"
],
"gitDir": "test/corpus/repos/go",
"shas": "22a5dcc7eb910c4be07e0d79c4010014c87b9a45..c8e821fccc1a9384008640b22a57896832df548d"
"shas": "058ac07a0f3562f11831ab26625123ab5766e1e6..1197356f080a71d4044bfe3a74c502914c372b54"
}
,{
"testCaseDescription": "go-imaginary-literals-replacement-test",
"expectedResult": {
"changes": {
"imaginary-literals.go": [
{
"span": {
"replace": [
{
"start": [
2,
5
],
"end": [
2,
8
]
},
{
"start": [
2,
5
],
"end": [
2,
8
]
}
]
},
"summary": "Replaced the '01i' imaginary_literal with the '02i' imaginary_literal in the a variable"
},
{
"span": {
"replace": [
{
"start": [
3,
5
],
"end": [
3,
13
]
},
{
"start": [
3,
5
],
"end": [
3,
13
]
}
]
},
"summary": "Replaced the '1.e+100i' imaginary_literal with the '1.e+103i' imaginary_literal in the b variable"
}
]
},
"changes": {},
"errors": {}
},
"filePaths": [
@ -300,119 +79,27 @@
],
"patch": [
"diff --git a/imaginary-literals.go b/imaginary-literals.go",
"index a7e36a5..6983988 100644",
"index 25a97da..151a533 100644",
"--- a/imaginary-literals.go",
"+++ b/imaginary-literals.go",
"@@ -1,6 +1,6 @@",
"@@ -2,7 +2,7 @@ package main",
" ",
" func main() {",
" const (",
"-a = 01i",
"-b = 1.e+100i",
"+a = 02i",
"+b = 1.e+103i",
" )",
" const (",
" a = 01i"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "c8e821fccc1a9384008640b22a57896832df548d..d7c0cbbf7c636589fb8707bd044efc2a9c74ac77"
"shas": "1197356f080a71d4044bfe3a74c502914c372b54..e727952359239c48acd0d18cc090dd940078e0b2"
}
,{
"testCaseDescription": "go-imaginary-literals-delete-replacement-test",
"expectedResult": {
"changes": {
"imaginary-literals.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
4,
2
]
}
},
"summary": "Deleted the 'a' variable"
},
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
4,
2
]
}
},
"summary": "Deleted the 'b' variable"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
8,
2
]
}
},
"summary": "Deleted the 'a' variable"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
8,
2
]
}
},
"summary": "Deleted the 'b' variable"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
8,
2
]
}
},
"summary": "Added the 'a' variable"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
8,
2
]
}
},
"summary": "Added the 'b' variable"
}
]
},
"changes": {},
"errors": {}
},
"filePaths": [
@ -420,65 +107,27 @@
],
"patch": [
"diff --git a/imaginary-literals.go b/imaginary-literals.go",
"index 6983988..02cff8d 100644",
"index 151a533..25a97da 100644",
"--- a/imaginary-literals.go",
"+++ b/imaginary-literals.go",
"@@ -1,12 +1,8 @@",
"@@ -2,7 +2,7 @@ package main",
" ",
" func main() {",
" const (",
"-a = 02i",
"-b = 1.e+103i",
"-)",
"-const (",
" a = 01i",
" b = 1.e+100i",
"+a = 01i",
"+b = 1.e+100i",
" )",
" const (",
"-a = 01i",
"-b = 1.e+100i",
"+a = 02i",
"+b = 1.e+103i",
" )"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "d7c0cbbf7c636589fb8707bd044efc2a9c74ac77..693f96d6dd713a80868ba814289fcf23a9542611"
"shas": "e727952359239c48acd0d18cc090dd940078e0b2..6063891f4a0e4562bc0a5625b80ca5143ff5e03d"
}
,{
"testCaseDescription": "go-imaginary-literals-delete-test",
"testCaseDescription": "go-imaginary-literals-delete-insert-test",
"expectedResult": {
"changes": {
"imaginary-literals.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
4,
2
]
}
},
"summary": "Deleted the 'a' variable"
},
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
4,
2
]
}
},
"summary": "Deleted the 'b' variable"
}
]
},
"changes": {},
"errors": {}
},
"filePaths": [
@ -486,24 +135,25 @@
],
"patch": [
"diff --git a/imaginary-literals.go b/imaginary-literals.go",
"index 02cff8d..6d8ec55 100644",
"index 25a97da..7905807 100644",
"--- a/imaginary-literals.go",
"+++ b/imaginary-literals.go",
"@@ -1,8 +1,4 @@",
" const (",
"@@ -1,8 +1,5 @@",
" package main",
" ",
" func main() {",
"-const (",
"-a = 01i",
"-b = 1.e+100i",
"-)",
"-const (",
" a = 02i",
" b = 1.e+103i",
" )"
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "693f96d6dd713a80868ba814289fcf23a9542611..ea50813182b228c1202b76c8c102a8156732e30a"
"shas": "6063891f4a0e4562bc0a5625b80ca5143ff5e03d..decfd7181ea1998e4b5d83e450d97b36cfbeb43d"
}
,{
"testCaseDescription": "go-imaginary-literals-delete-rest-test",
"testCaseDescription": "go-imaginary-literals-teardown-test",
"expectedResult": {
"changes": {
"imaginary-literals.go": [
@ -515,27 +165,12 @@
1
],
"end": [
4,
2
]
}
},
"summary": "Deleted the 'a' variable"
},
{
"span": {
"delete": {
"start": [
1,
6,
1
],
"end": [
4,
2
]
}
},
"summary": "Deleted the 'b' variable"
"summary": "Deleted the 'main' module"
}
]
},
@ -546,15 +181,16 @@
],
"patch": [
"diff --git a/imaginary-literals.go b/imaginary-literals.go",
"index 6d8ec55..e69de29 100644",
"index 7905807..e69de29 100644",
"--- a/imaginary-literals.go",
"+++ b/imaginary-literals.go",
"@@ -1,4 +0,0 @@",
"-const (",
"-a = 02i",
"-b = 1.e+103i",
"-)"
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "ea50813182b228c1202b76c8c102a8156732e30a..740c6c6b1390c86d2f179d9d31f010916292861a"
"shas": "decfd7181ea1998e4b5d83e450d97b36cfbeb43d..7313c98bc1dadd02edefed0e5dac5b0a8d79ae27"
}]

View File

@ -1,107 +1,50 @@
[{
"testCaseDescription": "go-increment-decrement-statements-setup-test",
"expectedResult": {
"changes": {
"increment-decrement-statements.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"increment-decrement-statements.go"
],
"patch": [
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
"index e69de29..7905807 100644",
"--- a/increment-decrement-statements.go",
"+++ b/increment-decrement-statements.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "2b1d8061a7e48430bdcb277b2424bdefa6e67cf6..c989a88b1dc14fd54cd47d6d5318ada6b5b3f836"
}
,{
"testCaseDescription": "go-increment-decrement-statements-insert-test",
"expectedResult": {
"changes": {
"increment-decrement-statements.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
2
]
}
},
"summary": "Added the 'i' identifier"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
2
]
}
},
"summary": "Added the 'j' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"increment-decrement-statements.go"
],
"patch": [
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
"index e69de29..c118f41 100644",
"--- a/increment-decrement-statements.go",
"+++ b/increment-decrement-statements.go",
"@@ -0,0 +1,2 @@",
"+i++",
"+j--"
],
"gitDir": "test/corpus/repos/go",
"shas": "927f995f9a27002e1694b5d3ce66a7dbbfda6720..08e1c1af15a7a2e6b3905900905a1fd79d6f1c43"
}
,{
"testCaseDescription": "go-increment-decrement-statements-replacement-insert-test",
"expectedResult": {
"changes": {
"increment-decrement-statements.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
4
]
}
},
"summary": "Added the 'foo' identifier"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
2
]
}
},
"summary": "Added the 'x' identifier"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
2
]
}
},
"summary": "Added the 'i' identifier"
},
{
"span": {
"insert": {
@ -115,92 +58,22 @@
]
}
},
"summary": "Added the 'j' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"increment-decrement-statements.go"
],
"patch": [
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
"index c118f41..d617bc4 100644",
"--- a/increment-decrement-statements.go",
"+++ b/increment-decrement-statements.go",
"@@ -1,2 +1,6 @@",
"+foo++",
"+x++",
"+i++",
"+j--",
" i++",
" j--"
],
"gitDir": "test/corpus/repos/go",
"shas": "08e1c1af15a7a2e6b3905900905a1fd79d6f1c43..ce7abe0a0dbc3a4f0c453bba572432d0ed745d36"
}
,{
"testCaseDescription": "go-increment-decrement-statements-delete-insert-test",
"expectedResult": {
"changes": {
"increment-decrement-statements.go": [
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
4
]
},
{
"start": [
1,
1
],
"end": [
1,
2
]
}
]
},
"summary": "Replaced the 'foo' identifier with the 'i' identifier"
"summary": "Added the 'i' identifier in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
2,
5,
1
],
"end": [
2,
5,
2
]
}
},
"summary": "Added the 'j' identifier"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
2
]
}
},
"summary": "Deleted the 'x' identifier"
"summary": "Added the 'j' identifier in the main function of the 'main' module"
}
]
},
@ -211,20 +84,20 @@
],
"patch": [
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
"index d617bc4..15214d0 100644",
"index 7905807..18bf03a 100644",
"--- a/increment-decrement-statements.go",
"+++ b/increment-decrement-statements.go",
"@@ -1,5 +1,5 @@",
"-foo++",
"-x++",
"@@ -1,5 +1,6 @@",
" package main",
" ",
" func main() {",
"-",
"+i++",
"+j--",
" i++",
" j--",
" i++"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "ce7abe0a0dbc3a4f0c453bba572432d0ed745d36..0fd355f46a4c9aec73e9874645e7a89d920e58e3"
"shas": "c989a88b1dc14fd54cd47d6d5318ada6b5b3f836..e3d6902e40ddbab185000f9fbfc03017693dc60e"
}
,{
"testCaseDescription": "go-increment-decrement-statements-replacement-test",
@ -236,57 +109,27 @@
"replace": [
{
"start": [
1,
3,
1
],
"end": [
1,
6,
2
]
},
{
"start": [
1,
3,
1
],
"end": [
1,
4
6,
2
]
}
]
},
"summary": "Replaced the 'i' identifier with the 'foo' identifier"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
2
]
}
},
"summary": "Added the 'x' identifier"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
2
]
}
},
"summary": "Deleted the 'j' identifier"
"summary": "Replaced the 'main' function with the 'main' function in the main module"
}
]
},
@ -297,20 +140,21 @@
],
"patch": [
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
"index 15214d0..d617bc4 100644",
"index 18bf03a..08611ad 100644",
"--- a/increment-decrement-statements.go",
"+++ b/increment-decrement-statements.go",
"@@ -1,5 +1,5 @@",
"@@ -1,6 +1,6 @@",
" package main",
" ",
" func main() {",
"-i++",
"-j--",
"+foo++",
"+x++",
" i++",
" j--",
" i++"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "0fd355f46a4c9aec73e9874645e7a89d920e58e3..628555688b52d8b03b5a7efa9fd07954f93c04fd"
"shas": "e3d6902e40ddbab185000f9fbfc03017693dc60e..33bb5d66b7e5b5e0dbf0af75d5359b0a363a3f70"
}
,{
"testCaseDescription": "go-increment-decrement-statements-delete-replacement-test",
@ -319,93 +163,30 @@
"increment-decrement-statements.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
4
]
}
"replace": [
{
"start": [
3,
1
],
"end": [
6,
2
]
},
{
"start": [
3,
1
],
"end": [
6,
2
]
}
]
},
"summary": "Deleted the 'foo' identifier"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
2
]
}
},
"summary": "Deleted the 'x' identifier"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
3,
2
]
}
},
"summary": "Deleted the 'i' identifier"
},
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
2
]
}
},
"summary": "Deleted the 'j' identifier"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
4
]
}
},
"summary": "Added the 'foo' identifier"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
2
]
}
},
"summary": "Added the 'x' identifier"
"summary": "Replaced the 'main' function with the 'main' function in the main module"
}
]
},
@ -416,24 +197,83 @@
],
"patch": [
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
"index d617bc4..640bbf1 100644",
"index 08611ad..18bf03a 100644",
"--- a/increment-decrement-statements.go",
"+++ b/increment-decrement-statements.go",
"@@ -1,6 +1,4 @@",
"@@ -1,6 +1,6 @@",
" package main",
" ",
" func main() {",
"-foo++",
"-x++",
"-i++",
"-j--",
" i++",
" j--",
"+foo++",
"+x++"
"+i++",
"+j--",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "628555688b52d8b03b5a7efa9fd07954f93c04fd..4df0db28123dab35f85c9f8c5f3f6045a9913354"
"shas": "33bb5d66b7e5b5e0dbf0af75d5359b0a363a3f70..d349600e254f9ae44be9841d3b410122f2b68aab"
}
,{
"testCaseDescription": "go-increment-decrement-statements-delete-test",
"testCaseDescription": "go-increment-decrement-statements-delete-insert-test",
"expectedResult": {
"changes": {
"increment-decrement-statements.go": [
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
2
]
}
},
"summary": "Deleted the 'i' identifier in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
5,
2
]
}
},
"summary": "Deleted the 'j' identifier in the main function of the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"increment-decrement-statements.go"
],
"patch": [
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
"index 18bf03a..7905807 100644",
"--- a/increment-decrement-statements.go",
"+++ b/increment-decrement-statements.go",
"@@ -1,6 +1,5 @@",
" package main",
" ",
" func main() {",
"-i++",
"-j--",
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "d349600e254f9ae44be9841d3b410122f2b68aab..295c41f2df73ea54dbb3b3d901f986a484eb1b30"
}
,{
"testCaseDescription": "go-increment-decrement-statements-teardown-test",
"expectedResult": {
"changes": {
"increment-decrement-statements.go": [
@ -445,27 +285,12 @@
1
],
"end": [
1,
2
]
}
},
"summary": "Deleted the 'i' identifier"
},
{
"span": {
"delete": {
"start": [
2,
6,
1
],
"end": [
2,
2
]
}
},
"summary": "Deleted the 'j' identifier"
"summary": "Deleted the 'main' module"
}
]
},
@ -476,69 +301,16 @@
],
"patch": [
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
"index 640bbf1..b7c351d 100644",
"index 7905807..e69de29 100644",
"--- a/increment-decrement-statements.go",
"+++ b/increment-decrement-statements.go",
"@@ -1,4 +1,2 @@",
"-i++",
"-j--",
" foo++",
" x++"
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "4df0db28123dab35f85c9f8c5f3f6045a9913354..f328fdb9b4ab03a8667cbcafaaf2ef18c667ac57"
}
,{
"testCaseDescription": "go-increment-decrement-statements-delete-rest-test",
"expectedResult": {
"changes": {
"increment-decrement-statements.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
4
]
}
},
"summary": "Deleted the 'foo' identifier"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
2
]
}
},
"summary": "Deleted the 'x' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"increment-decrement-statements.go"
],
"patch": [
"diff --git a/increment-decrement-statements.go b/increment-decrement-statements.go",
"index b7c351d..e69de29 100644",
"--- a/increment-decrement-statements.go",
"+++ b/increment-decrement-statements.go",
"@@ -1,2 +0,0 @@",
"-foo++",
"-x++"
],
"gitDir": "test/corpus/repos/go",
"shas": "f328fdb9b4ab03a8667cbcafaaf2ef18c667ac57..a5b8a6804181af3a1387f9a23e3f85c44ddb6082"
"shas": "295c41f2df73ea54dbb3b3d901f986a484eb1b30..a2ecc6ebae77d3db68e1aa65cbddf0b97039bb48"
}]

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,46 @@
[{
"testCaseDescription": "go-label-statements-setup-test",
"expectedResult": {
"changes": {
"label-statements.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"label-statements.go"
],
"patch": [
"diff --git a/label-statements.go b/label-statements.go",
"index e69de29..7905807 100644",
"--- a/label-statements.go",
"+++ b/label-statements.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "62ff6615442be7bd2302df890296d069d758dc31..1b7a4052284fac92f8239738eebb77b56fb81c42"
}
,{
"testCaseDescription": "go-label-statements-insert-test",
"expectedResult": {
"changes": {
@ -7,16 +49,16 @@
"span": {
"insert": {
"start": [
2,
5,
3
],
"end": [
2,
5,
15
]
}
},
"summary": "Added the 'insert_label' identifier"
"summary": "Added the 'insert_label' identifier in the main function of the 'main' module"
}
]
},
@ -27,132 +69,21 @@
],
"patch": [
"diff --git a/label-statements.go b/label-statements.go",
"index e69de29..d0544fe 100644",
"index 7905807..b0a2969 100644",
"--- a/label-statements.go",
"+++ b/label-statements.go",
"@@ -0,0 +1,3 @@",
"+{",
"+ insert_label:",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "13fa148e00739eba43f10562e024e15d2fc7e5d9..ec940835e3aadb604515bf67c883ca6521cb2d08"
}
,{
"testCaseDescription": "go-label-statements-replacement-insert-test",
"expectedResult": {
"changes": {
"label-statements.go": [
{
"span": {
"insert": {
"start": [
2,
3
],
"end": [
2,
20
]
}
},
"summary": "Added the 'replacement_label' identifier"
},
{
"span": {
"insert": {
"start": [
5,
3
],
"end": [
5,
15
]
}
},
"summary": "Added the 'insert_label' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"label-statements.go"
],
"patch": [
"diff --git a/label-statements.go b/label-statements.go",
"index d0544fe..745311d 100644",
"--- a/label-statements.go",
"+++ b/label-statements.go",
"@@ -1,3 +1,9 @@",
" {",
"+ replacement_label:",
"+}",
"@@ -1,5 +1,7 @@",
" package main",
" ",
" func main() {",
"-",
"+{",
"+ insert_label:",
"+}",
"+{",
" insert_label:",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "ec940835e3aadb604515bf67c883ca6521cb2d08..5e455b8924d22fe892b8bab4970fc6524c4deefc"
}
,{
"testCaseDescription": "go-label-statements-delete-insert-test",
"expectedResult": {
"changes": {
"label-statements.go": [
{
"span": {
"replace": [
{
"start": [
2,
3
],
"end": [
2,
20
]
},
{
"start": [
2,
3
],
"end": [
2,
15
]
}
]
},
"summary": "Replaced the 'replacement_label' identifier with the 'insert_label' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"label-statements.go"
],
"patch": [
"diff --git a/label-statements.go b/label-statements.go",
"index 745311d..be34b5c 100644",
"--- a/label-statements.go",
"+++ b/label-statements.go",
"@@ -1,5 +1,5 @@",
" {",
"- replacement_label:",
"+ insert_label:",
" }",
" {",
" insert_label:"
],
"gitDir": "test/corpus/repos/go",
"shas": "5e455b8924d22fe892b8bab4970fc6524c4deefc..8a5a495c2571e6547c42e532abcb5a9f3aec4024"
"shas": "1b7a4052284fac92f8239738eebb77b56fb81c42..40b6fb4be66aa3d57d352d6baeebf06edbb77e51"
}
,{
"testCaseDescription": "go-label-statements-replacement-test",
@ -164,27 +95,27 @@
"replace": [
{
"start": [
2,
5,
3
],
"end": [
2,
5,
15
]
},
{
"start": [
2,
5,
3
],
"end": [
2,
5,
20
]
}
]
},
"summary": "Replaced the 'insert_label' identifier with the 'replacement_label' identifier"
"summary": "Replaced the 'insert_label' identifier with the 'replacement_label' identifier in the main function of the 'main' module"
}
]
},
@ -195,19 +126,20 @@
],
"patch": [
"diff --git a/label-statements.go b/label-statements.go",
"index be34b5c..745311d 100644",
"index b0a2969..3d3cf16 100644",
"--- a/label-statements.go",
"+++ b/label-statements.go",
"@@ -1,5 +1,5 @@",
"@@ -2,6 +2,6 @@ package main",
" ",
" func main() {",
" {",
"- insert_label:",
"+ replacement_label:",
" }",
" {",
" insert_label:"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "8a5a495c2571e6547c42e532abcb5a9f3aec4024..22c8014919ec0c0808de5aad53da258e151ed475"
"shas": "40b6fb4be66aa3d57d352d6baeebf06edbb77e51..a49d6df009a087f19b18f74b49514d77f8720ee2"
}
,{
"testCaseDescription": "go-label-statements-delete-replacement-test",
@ -216,48 +148,30 @@
"label-statements.go": [
{
"span": {
"delete": {
"start": [
2,
3
],
"end": [
2,
20
]
}
"replace": [
{
"start": [
5,
3
],
"end": [
5,
20
]
},
{
"start": [
5,
3
],
"end": [
5,
15
]
}
]
},
"summary": "Deleted the 'replacement_label' identifier"
},
{
"span": {
"delete": {
"start": [
5,
3
],
"end": [
5,
15
]
}
},
"summary": "Deleted the 'insert_label' identifier"
},
{
"span": {
"insert": {
"start": [
5,
3
],
"end": [
5,
20
]
}
},
"summary": "Added the 'replacement_label' identifier"
"summary": "Replaced the 'replacement_label' identifier with the 'insert_label' identifier in the main function of the 'main' module"
}
]
},
@ -268,26 +182,23 @@
],
"patch": [
"diff --git a/label-statements.go b/label-statements.go",
"index 745311d..57f6c03 100644",
"index 3d3cf16..b0a2969 100644",
"--- a/label-statements.go",
"+++ b/label-statements.go",
"@@ -1,9 +1,6 @@",
"@@ -2,6 +2,6 @@ package main",
" ",
" func main() {",
" {",
"- replacement_label:",
"-}",
"-{",
" insert_label:",
"+ insert_label:",
" }",
" {",
"- insert_label:",
"+ replacement_label:",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "22c8014919ec0c0808de5aad53da258e151ed475..6cab5df3eecd3e4b9cde037c1d0d63c733be9b25"
"shas": "a49d6df009a087f19b18f74b49514d77f8720ee2..578dd6e4976d3dfe5ad820cfa5c945afbec65caf"
}
,{
"testCaseDescription": "go-label-statements-delete-test",
"testCaseDescription": "go-label-statements-delete-insert-test",
"expectedResult": {
"changes": {
"label-statements.go": [
@ -295,16 +206,16 @@
"span": {
"delete": {
"start": [
2,
5,
3
],
"end": [
2,
5,
15
]
}
},
"summary": "Deleted the 'insert_label' identifier"
"summary": "Deleted the 'insert_label' identifier in the main function of the 'main' module"
}
]
},
@ -315,22 +226,24 @@
],
"patch": [
"diff --git a/label-statements.go b/label-statements.go",
"index 57f6c03..6920e65 100644",
"index b0a2969..7905807 100644",
"--- a/label-statements.go",
"+++ b/label-statements.go",
"@@ -1,6 +1,3 @@",
" {",
"@@ -1,7 +1,5 @@",
" package main",
" ",
" func main() {",
"-{",
"- insert_label:",
"-}",
"-{",
" replacement_label:",
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "6cab5df3eecd3e4b9cde037c1d0d63c733be9b25..66df55101e51883709ed9932d216cb965d9bef49"
"shas": "578dd6e4976d3dfe5ad820cfa5c945afbec65caf..9f156e917c0ac7ab380ab27a8bdf1c2632724dc4"
}
,{
"testCaseDescription": "go-label-statements-delete-rest-test",
"testCaseDescription": "go-label-statements-teardown-test",
"expectedResult": {
"changes": {
"label-statements.go": [
@ -338,16 +251,16 @@
"span": {
"delete": {
"start": [
2,
3
1,
1
],
"end": [
2,
20
6,
1
]
}
},
"summary": "Deleted the 'replacement_label' identifier"
"summary": "Deleted the 'main' module"
}
]
},
@ -358,14 +271,16 @@
],
"patch": [
"diff --git a/label-statements.go b/label-statements.go",
"index 6920e65..e69de29 100644",
"index 7905807..e69de29 100644",
"--- a/label-statements.go",
"+++ b/label-statements.go",
"@@ -1,3 +0,0 @@",
"-{",
"- replacement_label:",
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "66df55101e51883709ed9932d216cb965d9bef49..d2477a592fdd731c7bb7e1b1d1fe4b3b87939257"
"shas": "9f156e917c0ac7ab380ab27a8bdf1c2632724dc4..678323dd89ca74cd5fe06c4efdc8ec7abe45b581"
}]

View File

@ -1,5 +1,5 @@
[{
"testCaseDescription": "go-map-literals-insert-test",
"testCaseDescription": "go-map-literals-setup-test",
"expectedResult": {
"changes": {
"map-literals.go": [
@ -11,12 +11,12 @@
1
],
"end": [
4,
2
6,
1
]
}
},
"summary": "Added the 's' variable"
"summary": "Added the 'main' module"
}
]
},
@ -27,55 +27,23 @@
],
"patch": [
"diff --git a/map-literals.go b/map-literals.go",
"index e69de29..16fb3cf 100644",
"index e69de29..7905807 100644",
"--- a/map-literals.go",
"+++ b/map-literals.go",
"@@ -0,0 +1,4 @@",
"+const s = map[string]string{",
"+\"hi\": \"hello\",",
"+\"bye\": \"goodbye\",",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "f366494a187af73e7fcf6d60c2aa3bb503543f80..e925ebba0abf3bdf2a84d3a66d52bd0380796809"
"shas": "1c340f41729820f4163b3ed6143addb772139b7f..6ec6a7ce9b7e806946ac140589fcf6fca239a556"
}
,{
"testCaseDescription": "go-map-literals-replacement-insert-test",
"testCaseDescription": "go-map-literals-insert-test",
"expectedResult": {
"changes": {
"map-literals.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
4,
2
]
}
},
"summary": "Added the 's' variable"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
8,
2
]
}
},
"summary": "Added the 's' variable"
}
]
},
"changes": {},
"errors": {}
},
"filePaths": [
@ -83,315 +51,27 @@
],
"patch": [
"diff --git a/map-literals.go b/map-literals.go",
"index 16fb3cf..b3c30ca 100644",
"index 7905807..bb99b5b 100644",
"--- a/map-literals.go",
"+++ b/map-literals.go",
"@@ -1,3 +1,11 @@",
"+const s = map[string]int{",
"+\"foo\": \"bar\",",
"+\"baz\": \"hello\",",
"+}",
"@@ -1,5 +1,8 @@",
" package main",
" ",
" func main() {",
"-",
"+const s = map[string]string{",
"+\"hi\": \"hello\",",
"+\"bye\": \"goodbye\",",
"+}",
" const s = map[string]string{",
" \"hi\": \"hello\",",
" \"bye\": \"goodbye\","
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "e925ebba0abf3bdf2a84d3a66d52bd0380796809..de28fc5f9c2b25ec7ae4a2a30d8a7edc342a76bb"
}
,{
"testCaseDescription": "go-map-literals-delete-insert-test",
"expectedResult": {
"changes": {
"map-literals.go": [
{
"span": {
"replace": [
{
"start": [
1,
22
],
"end": [
1,
25
]
},
{
"start": [
1,
15
],
"end": [
1,
21
]
}
]
},
"summary": "Replaced the 'int' identifier with the 'string' identifier in the s variable"
},
{
"span": {
"replace": [
{
"start": [
2,
1
],
"end": [
2,
6
]
},
{
"start": [
2,
1
],
"end": [
2,
5
]
}
]
},
"summary": "Replaced the \"foo\" string with the \"hi\" string in the s variable"
},
{
"span": {
"replace": [
{
"start": [
2,
8
],
"end": [
2,
13
]
},
{
"start": [
2,
7
],
"end": [
2,
14
]
}
]
},
"summary": "Replaced the \"bar\" string with the \"hello\" string in the s variable"
},
{
"span": {
"replace": [
{
"start": [
3,
1
],
"end": [
3,
6
]
},
{
"start": [
3,
1
],
"end": [
3,
6
]
}
]
},
"summary": "Replaced the \"baz\" string with the \"bye\" string in the s variable"
},
{
"span": {
"replace": [
{
"start": [
3,
8
],
"end": [
3,
15
]
},
{
"start": [
3,
8
],
"end": [
3,
17
]
}
]
},
"summary": "Replaced the \"hello\" string with the \"goodbye\" string in the s variable"
}
]
},
"errors": {}
},
"filePaths": [
"map-literals.go"
],
"patch": [
"diff --git a/map-literals.go b/map-literals.go",
"index b3c30ca..72c2e91 100644",
"--- a/map-literals.go",
"+++ b/map-literals.go",
"@@ -1,6 +1,6 @@",
"-const s = map[string]int{",
"-\"foo\": \"bar\",",
"-\"baz\": \"hello\",",
"+const s = map[string]string{",
"+\"hi\": \"hello\",",
"+\"bye\": \"goodbye\",",
" }",
" const s = map[string]string{",
" \"hi\": \"hello\","
],
"gitDir": "test/corpus/repos/go",
"shas": "de28fc5f9c2b25ec7ae4a2a30d8a7edc342a76bb..db595e9471ff2fef089dc2aa7f502568d1502a6a"
"shas": "6ec6a7ce9b7e806946ac140589fcf6fca239a556..5f1fc8aa85a73f2ff0f302f7de8c8bd9668b35ab"
}
,{
"testCaseDescription": "go-map-literals-replacement-test",
"expectedResult": {
"changes": {
"map-literals.go": [
{
"span": {
"delete": {
"start": [
1,
15
],
"end": [
1,
21
]
}
},
"summary": "Deleted the 'string' identifier in the s variable"
},
{
"span": {
"insert": {
"start": [
1,
22
],
"end": [
1,
25
]
}
},
"summary": "Added the 'int' identifier in the s variable"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
6
]
}
},
"summary": "Added the \"foo\" string in the s variable"
},
{
"span": {
"insert": {
"start": [
2,
8
],
"end": [
2,
13
]
}
},
"summary": "Added the \"bar\" string in the s variable"
},
{
"span": {
"replace": [
{
"start": [
2,
1
],
"end": [
2,
5
]
},
{
"start": [
3,
1
],
"end": [
3,
6
]
}
]
},
"summary": "Replaced the \"hi\" string with the \"baz\" string in the s variable"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
3,
6
]
}
},
"summary": "Deleted the \"bye\" string in the s variable"
},
{
"span": {
"delete": {
"start": [
3,
8
],
"end": [
3,
17
]
}
},
"summary": "Deleted the \"goodbye\" string in the s variable"
}
]
},
"changes": {},
"errors": {}
},
"filePaths": [
@ -399,10 +79,13 @@
],
"patch": [
"diff --git a/map-literals.go b/map-literals.go",
"index 72c2e91..b3c30ca 100644",
"index bb99b5b..a9e0b66 100644",
"--- a/map-literals.go",
"+++ b/map-literals.go",
"@@ -1,6 +1,6 @@",
"@@ -1,8 +1,8 @@",
" package main",
" ",
" func main() {",
"-const s = map[string]string{",
"-\"hi\": \"hello\",",
"-\"bye\": \"goodbye\",",
@ -410,64 +93,15 @@
"+\"foo\": \"bar\",",
"+\"baz\": \"hello\",",
" }",
" const s = map[string]string{",
" \"hi\": \"hello\","
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "db595e9471ff2fef089dc2aa7f502568d1502a6a..a7fd4cda280bf4ae44d7ada58ada52f350017735"
"shas": "5f1fc8aa85a73f2ff0f302f7de8c8bd9668b35ab..8e15357b1c5a96af3f2ac11b78a8f2ec001ded7f"
}
,{
"testCaseDescription": "go-map-literals-delete-replacement-test",
"expectedResult": {
"changes": {
"map-literals.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
4,
2
]
}
},
"summary": "Deleted the 's' variable"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
8,
2
]
}
},
"summary": "Deleted the 's' variable"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
8,
2
]
}
},
"summary": "Added the 's' variable"
}
]
},
"changes": {},
"errors": {}
},
"filePaths": [
@ -475,51 +109,29 @@
],
"patch": [
"diff --git a/map-literals.go b/map-literals.go",
"index b3c30ca..6d5f577 100644",
"index a9e0b66..bb99b5b 100644",
"--- a/map-literals.go",
"+++ b/map-literals.go",
"@@ -1,12 +1,8 @@",
"@@ -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\",",
"+const s = map[string]string{",
"+\"hi\": \"hello\",",
"+\"bye\": \"goodbye\",",
" }",
"-const s = map[string]string{",
"-\"hi\": \"hello\",",
"-\"bye\": \"goodbye\",",
"+const s = map[string]int{",
"+\"foo\": \"bar\",",
"+\"baz\": \"hello\",",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "a7fd4cda280bf4ae44d7ada58ada52f350017735..c67615be6903f594bbda655de325f090b44a779e"
"shas": "8e15357b1c5a96af3f2ac11b78a8f2ec001ded7f..136cbf843e66bfcf11eb830177a80d81a2cbaa93"
}
,{
"testCaseDescription": "go-map-literals-delete-test",
"testCaseDescription": "go-map-literals-delete-insert-test",
"expectedResult": {
"changes": {
"map-literals.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
4,
2
]
}
},
"summary": "Deleted the 's' variable"
}
]
},
"changes": {},
"errors": {}
},
"filePaths": [
@ -527,23 +139,25 @@
],
"patch": [
"diff --git a/map-literals.go b/map-literals.go",
"index 6d5f577..7f8e649 100644",
"index bb99b5b..7905807 100644",
"--- a/map-literals.go",
"+++ b/map-literals.go",
"@@ -1,7 +1,3 @@",
"@@ -1,8 +1,5 @@",
" 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": "c67615be6903f594bbda655de325f090b44a779e..1c5da0b334e2c57d642798de8f4554d4e5d7e8b9"
"shas": "136cbf843e66bfcf11eb830177a80d81a2cbaa93..bd4f97bd70b2dfcf8fb4530945b95510de477b4a"
}
,{
"testCaseDescription": "go-map-literals-delete-rest-test",
"testCaseDescription": "go-map-literals-teardown-test",
"expectedResult": {
"changes": {
"map-literals.go": [
@ -555,12 +169,12 @@
1
],
"end": [
4,
2
6,
1
]
}
},
"summary": "Deleted the 's' variable"
"summary": "Deleted the 'main' module"
}
]
},
@ -571,15 +185,16 @@
],
"patch": [
"diff --git a/map-literals.go b/map-literals.go",
"index 7f8e649..e69de29 100644",
"index 7905807..e69de29 100644",
"--- a/map-literals.go",
"+++ b/map-literals.go",
"@@ -1,4 +0,0 @@",
"-const s = map[string]int{",
"-\"foo\": \"bar\",",
"-\"baz\": \"hello\",",
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "1c5da0b334e2c57d642798de8f4554d4e5d7e8b9..821d52811675ea17dd00d79b0f4e082376b97afc"
"shas": "bd4f97bd70b2dfcf8fb4530945b95510de477b4a..b92b7fa71587a369b3db2ed6695f7537c36a4729"
}]

View File

@ -1,4 +1,46 @@
[{
"testCaseDescription": "go-map-types-setup-test",
"expectedResult": {
"changes": {
"map-types.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"map-types.go"
],
"patch": [
"diff --git a/map-types.go b/map-types.go",
"index e69de29..7905807 100644",
"--- a/map-types.go",
"+++ b/map-types.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "be8ea48174a3742d19cc12045e33e627afe88369..677e156d5d7c2467e820724b4433a6e0823baee8"
}
,{
"testCaseDescription": "go-map-types-insert-test",
"expectedResult": {
"changes": {
@ -7,46 +49,46 @@
"span": {
"insert": {
"start": [
1,
4,
6
],
"end": [
1,
4,
8
]
}
},
"summary": "Added the 'm1' identifier"
"summary": "Added the 'm1' identifier in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
1,
4,
13
],
"end": [
1,
4,
19
]
}
},
"summary": "Added the 'string' identifier"
"summary": "Added the 'string' identifier in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
1,
4,
20
],
"end": [
1,
4,
25
]
}
},
"summary": "Added the 'error' identifier"
"summary": "Added the 'error' identifier in the main function of the 'main' module"
}
]
},
@ -57,182 +99,19 @@
],
"patch": [
"diff --git a/map-types.go b/map-types.go",
"index e69de29..c86220d 100644",
"index 7905807..01004b3 100644",
"--- a/map-types.go",
"+++ b/map-types.go",
"@@ -0,0 +1 @@",
"+type m1 map[string]error"
],
"gitDir": "test/corpus/repos/go",
"shas": "26e4335c9f693f66513cac8f6c4399a4fc45ad1b..728bb866043561cbbdc1e2b9db04ac55e14bd2fe"
}
,{
"testCaseDescription": "go-map-types-replacement-insert-test",
"expectedResult": {
"changes": {
"map-types.go": [
{
"span": {
"insert": {
"start": [
1,
6
],
"end": [
1,
8
]
}
},
"summary": "Added the 'm1' identifier"
},
{
"span": {
"insert": {
"start": [
1,
13
],
"end": [
1,
16
]
}
},
"summary": "Added the 'int' identifier"
},
{
"span": {
"insert": {
"start": [
1,
17
],
"end": [
1,
22
]
}
},
"summary": "Added the 'error' identifier"
},
{
"span": {
"insert": {
"start": [
2,
6
],
"end": [
2,
8
]
}
},
"summary": "Added the 'm1' identifier"
},
{
"span": {
"insert": {
"start": [
2,
13
],
"end": [
2,
19
]
}
},
"summary": "Added the 'string' identifier"
},
{
"span": {
"insert": {
"start": [
2,
20
],
"end": [
2,
25
]
}
},
"summary": "Added the 'error' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"map-types.go"
],
"patch": [
"diff --git a/map-types.go b/map-types.go",
"index c86220d..9cc2e8b 100644",
"--- a/map-types.go",
"+++ b/map-types.go",
"@@ -1 +1,3 @@",
"+type m1 map[int]error",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-",
"+type m1 map[string]error",
" type m1 map[string]error"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "728bb866043561cbbdc1e2b9db04ac55e14bd2fe..354b111d5e50ea7cca50e6dd82d6a096bb4dc043"
}
,{
"testCaseDescription": "go-map-types-delete-insert-test",
"expectedResult": {
"changes": {
"map-types.go": [
{
"span": {
"replace": [
{
"start": [
1,
13
],
"end": [
1,
16
]
},
{
"start": [
1,
13
],
"end": [
1,
19
]
}
]
},
"summary": "Replaced the 'int' identifier with the 'string' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"map-types.go"
],
"patch": [
"diff --git a/map-types.go b/map-types.go",
"index 9cc2e8b..ee1d5a0 100644",
"--- a/map-types.go",
"+++ b/map-types.go",
"@@ -1,3 +1,3 @@",
"-type m1 map[int]error",
"+type m1 map[string]error",
" type m1 map[string]error",
" type m1 map[string]error"
],
"gitDir": "test/corpus/repos/go",
"shas": "354b111d5e50ea7cca50e6dd82d6a096bb4dc043..8d18ca22d7735a4d4ec15aaa47bb3f6f3cc31d43"
"shas": "677e156d5d7c2467e820724b4433a6e0823baee8..8507b15f51f55c5905fff30d46b49e9a5220feeb"
}
,{
"testCaseDescription": "go-map-types-replacement-test",
@ -244,27 +123,27 @@
"replace": [
{
"start": [
1,
4,
13
],
"end": [
1,
4,
19
]
},
{
"start": [
1,
4,
13
],
"end": [
1,
4,
16
]
}
]
},
"summary": "Replaced the 'string' identifier with the 'int' identifier"
"summary": "Replaced the 'string' identifier with the 'int' identifier in the main function of the 'main' module"
}
]
},
@ -275,17 +154,19 @@
],
"patch": [
"diff --git a/map-types.go b/map-types.go",
"index ee1d5a0..9cc2e8b 100644",
"index 01004b3..a118e92 100644",
"--- a/map-types.go",
"+++ b/map-types.go",
"@@ -1,3 +1,3 @@",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-type m1 map[string]error",
"+type m1 map[int]error",
" type m1 map[string]error",
" type m1 map[string]error"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "8d18ca22d7735a4d4ec15aaa47bb3f6f3cc31d43..f39a4aa0643801fca32ef454238ad77644439dab"
"shas": "8507b15f51f55c5905fff30d46b49e9a5220feeb..8b9e0c6187abe2c4ec7a31062111368b2ce8c702"
}
,{
"testCaseDescription": "go-map-types-delete-replacement-test",
@ -294,138 +175,30 @@
"map-types.go": [
{
"span": {
"delete": {
"start": [
1,
6
],
"end": [
1,
8
]
}
"replace": [
{
"start": [
4,
13
],
"end": [
4,
16
]
},
{
"start": [
4,
13
],
"end": [
4,
19
]
}
]
},
"summary": "Deleted the 'm1' identifier"
},
{
"span": {
"delete": {
"start": [
1,
13
],
"end": [
1,
16
]
}
},
"summary": "Deleted the 'int' identifier"
},
{
"span": {
"delete": {
"start": [
1,
17
],
"end": [
1,
22
]
}
},
"summary": "Deleted the 'error' identifier"
},
{
"span": {
"delete": {
"start": [
2,
6
],
"end": [
2,
8
]
}
},
"summary": "Deleted the 'm1' identifier"
},
{
"span": {
"delete": {
"start": [
2,
13
],
"end": [
2,
19
]
}
},
"summary": "Deleted the 'string' identifier"
},
{
"span": {
"delete": {
"start": [
2,
20
],
"end": [
2,
25
]
}
},
"summary": "Deleted the 'error' identifier"
},
{
"span": {
"insert": {
"start": [
2,
6
],
"end": [
2,
8
]
}
},
"summary": "Added the 'm1' identifier"
},
{
"span": {
"insert": {
"start": [
2,
13
],
"end": [
2,
16
]
}
},
"summary": "Added the 'int' identifier"
},
{
"span": {
"insert": {
"start": [
2,
17
],
"end": [
2,
22
]
}
},
"summary": "Added the 'error' identifier"
"summary": "Replaced the 'int' identifier with the 'string' identifier in the main function of the 'main' module"
}
]
},
@ -436,20 +209,22 @@
],
"patch": [
"diff --git a/map-types.go b/map-types.go",
"index 9cc2e8b..a863ca9 100644",
"index a118e92..01004b3 100644",
"--- a/map-types.go",
"+++ b/map-types.go",
"@@ -1,3 +1,2 @@",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-type m1 map[int]error",
"-type m1 map[string]error",
" type m1 map[string]error",
"+type m1 map[int]error"
"+type m1 map[string]error",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "f39a4aa0643801fca32ef454238ad77644439dab..103b721414de3bbad2adbe781738973424c8e468"
"shas": "8b9e0c6187abe2c4ec7a31062111368b2ce8c702..492144a34769e3ad6c958a86eeaacde01a27ddd5"
}
,{
"testCaseDescription": "go-map-types-delete-test",
"testCaseDescription": "go-map-types-delete-insert-test",
"expectedResult": {
"changes": {
"map-types.go": [
@ -457,46 +232,46 @@
"span": {
"delete": {
"start": [
1,
4,
6
],
"end": [
1,
4,
8
]
}
},
"summary": "Deleted the 'm1' identifier"
"summary": "Deleted the 'm1' identifier in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
1,
4,
13
],
"end": [
1,
4,
19
]
}
},
"summary": "Deleted the 'string' identifier"
"summary": "Deleted the 'string' identifier in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
1,
4,
20
],
"end": [
1,
4,
25
]
}
},
"summary": "Deleted the 'error' identifier"
"summary": "Deleted the 'error' identifier in the main function of the 'main' module"
}
]
},
@ -507,18 +282,22 @@
],
"patch": [
"diff --git a/map-types.go b/map-types.go",
"index a863ca9..d7e6949 100644",
"index 01004b3..7905807 100644",
"--- a/map-types.go",
"+++ b/map-types.go",
"@@ -1,2 +1 @@",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-type m1 map[string]error",
" type m1 map[int]error"
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "103b721414de3bbad2adbe781738973424c8e468..ac2d072f1c3048451e824aaf604dcda59c62c4a3"
"shas": "492144a34769e3ad6c958a86eeaacde01a27ddd5..2ebf8efc0c1ed8caa4e454e12c9dab197e1c61ae"
}
,{
"testCaseDescription": "go-map-types-delete-rest-test",
"testCaseDescription": "go-map-types-teardown-test",
"expectedResult": {
"changes": {
"map-types.go": [
@ -527,45 +306,15 @@
"delete": {
"start": [
1,
6
1
],
"end": [
1,
8
6,
1
]
}
},
"summary": "Deleted the 'm1' identifier"
},
{
"span": {
"delete": {
"start": [
1,
13
],
"end": [
1,
16
]
}
},
"summary": "Deleted the 'int' identifier"
},
{
"span": {
"delete": {
"start": [
1,
17
],
"end": [
1,
22
]
}
},
"summary": "Deleted the 'error' identifier"
"summary": "Deleted the 'main' module"
}
]
},
@ -576,12 +325,16 @@
],
"patch": [
"diff --git a/map-types.go b/map-types.go",
"index d7e6949..e69de29 100644",
"index 7905807..e69de29 100644",
"--- a/map-types.go",
"+++ b/map-types.go",
"@@ -1 +0,0 @@",
"-type m1 map[int]error"
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "ac2d072f1c3048451e824aaf604dcda59c62c4a3..3cf1fd2c498440d58dd5df34a4f217c00efa71b1"
"shas": "2ebf8efc0c1ed8caa4e454e12c9dab197e1c61ae..059dead0d1b7de6823b26dc703fbeffd26fcc38c"
}]

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,46 @@
[{
"testCaseDescription": "go-pointer-types-setup-test",
"expectedResult": {
"changes": {
"pointer-types.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"pointer-types.go"
],
"patch": [
"diff --git a/pointer-types.go b/pointer-types.go",
"index e69de29..7905807 100644",
"--- a/pointer-types.go",
"+++ b/pointer-types.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "059dead0d1b7de6823b26dc703fbeffd26fcc38c..f1e7e56ca18ca0e23510e42de2aab595c8d597ac"
}
,{
"testCaseDescription": "go-pointer-types-insert-test",
"expectedResult": {
"changes": {
@ -7,61 +49,61 @@
"span": {
"insert": {
"start": [
2,
5,
1
],
"end": [
2,
5,
3
]
}
},
"summary": "Added the 'p1' identifier"
"summary": "Added the 'p1' identifier in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
2,
5,
5
],
"end": [
2,
5,
11
]
}
},
"summary": "Added the 'string' identifier"
"summary": "Added the 'string' identifier in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
3,
6,
1
],
"end": [
3,
6,
3
]
}
},
"summary": "Added the 'p2' identifier"
"summary": "Added the 'p2' identifier in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
3,
6,
6
],
"end": [
3,
6,
8
]
}
},
"summary": "Added the 'p1' identifier"
"summary": "Added the 'p1' identifier in the main function of the 'main' module"
}
]
},
@ -72,255 +114,22 @@
],
"patch": [
"diff --git a/pointer-types.go b/pointer-types.go",
"index e69de29..05b4659 100644",
"index 7905807..98e7b8a 100644",
"--- a/pointer-types.go",
"+++ b/pointer-types.go",
"@@ -0,0 +1,4 @@",
"+type (",
"+p1 *string",
"+p2 **p1",
"+)"
],
"gitDir": "test/corpus/repos/go",
"shas": "3cf1fd2c498440d58dd5df34a4f217c00efa71b1..cff34d9b4f8663f9e2a85316a00629c162eaab24"
}
,{
"testCaseDescription": "go-pointer-types-replacement-insert-test",
"expectedResult": {
"changes": {
"pointer-types.go": [
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
3
]
}
},
"summary": "Added the 'p1' identifier"
},
{
"span": {
"insert": {
"start": [
2,
5
],
"end": [
2,
8
]
}
},
"summary": "Added the 'int' identifier"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
3
]
}
},
"summary": "Added the 'p2' identifier"
},
{
"span": {
"insert": {
"start": [
3,
6
],
"end": [
3,
8
]
}
},
"summary": "Added the 'p3' identifier"
},
{
"span": {
"insert": {
"start": [
6,
1
],
"end": [
6,
3
]
}
},
"summary": "Added the 'p1' identifier"
},
{
"span": {
"insert": {
"start": [
6,
5
],
"end": [
6,
11
]
}
},
"summary": "Added the 'string' identifier"
},
{
"span": {
"insert": {
"start": [
7,
1
],
"end": [
7,
3
]
}
},
"summary": "Added the 'p2' identifier"
},
{
"span": {
"insert": {
"start": [
7,
6
],
"end": [
7,
8
]
}
},
"summary": "Added the 'p1' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"pointer-types.go"
],
"patch": [
"diff --git a/pointer-types.go b/pointer-types.go",
"index 05b4659..95e685d 100644",
"--- a/pointer-types.go",
"+++ b/pointer-types.go",
"@@ -1,4 +1,12 @@",
" type (",
"+p1 *int",
"+p2 **p3",
"+)",
"@@ -1,5 +1,8 @@",
" package main",
" ",
" func main() {",
"-",
"+type (",
"+p1 *string",
"+p2 **p1",
"+)",
"+type (",
" p1 *string",
" p2 **p1",
" )"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "cff34d9b4f8663f9e2a85316a00629c162eaab24..0a00ceceb6353a9970f1aa9ced5771b5b21883c6"
}
,{
"testCaseDescription": "go-pointer-types-delete-insert-test",
"expectedResult": {
"changes": {
"pointer-types.go": [
{
"span": {
"replace": [
{
"start": [
2,
5
],
"end": [
2,
8
]
},
{
"start": [
2,
5
],
"end": [
2,
11
]
}
]
},
"summary": "Replaced the 'int' identifier with the 'string' identifier"
},
{
"span": {
"replace": [
{
"start": [
3,
6
],
"end": [
3,
8
]
},
{
"start": [
3,
6
],
"end": [
3,
8
]
}
]
},
"summary": "Replaced the 'p3' identifier with the 'p1' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"pointer-types.go"
],
"patch": [
"diff --git a/pointer-types.go b/pointer-types.go",
"index 95e685d..74ff673 100644",
"--- a/pointer-types.go",
"+++ b/pointer-types.go",
"@@ -1,6 +1,6 @@",
" type (",
"-p1 *int",
"-p2 **p3",
"+p1 *string",
"+p2 **p1",
" )",
" type (",
" p1 *string"
],
"gitDir": "test/corpus/repos/go",
"shas": "0a00ceceb6353a9970f1aa9ced5771b5b21883c6..2f99a01b337c02263ca4e9399902b16aaba1dedf"
"shas": "f1e7e56ca18ca0e23510e42de2aab595c8d597ac..76c6d036f7261edba34134b062f955e5357b3cea"
}
,{
"testCaseDescription": "go-pointer-types-replacement-test",
@ -332,54 +141,54 @@
"replace": [
{
"start": [
2,
5,
5
],
"end": [
2,
5,
11
]
},
{
"start": [
2,
5,
5
],
"end": [
2,
5,
8
]
}
]
},
"summary": "Replaced the 'string' identifier with the 'int' identifier"
"summary": "Replaced the 'string' identifier with the 'int' identifier in the main function of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
3,
6,
6
],
"end": [
3,
6,
8
]
},
{
"start": [
3,
6,
6
],
"end": [
3,
6,
8
]
}
]
},
"summary": "Replaced the 'p1' identifier with the 'p3' identifier"
"summary": "Replaced the 'p1' identifier with the 'p3' identifier in the main function of the 'main' module"
}
]
},
@ -390,21 +199,22 @@
],
"patch": [
"diff --git a/pointer-types.go b/pointer-types.go",
"index 74ff673..95e685d 100644",
"index 98e7b8a..36eb5ff 100644",
"--- a/pointer-types.go",
"+++ b/pointer-types.go",
"@@ -1,6 +1,6 @@",
"@@ -2,7 +2,7 @@ package main",
" ",
" func main() {",
" type (",
"-p1 *string",
"-p2 **p1",
"+p1 *int",
"+p2 **p3",
" )",
" type (",
" p1 *string"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "2f99a01b337c02263ca4e9399902b16aaba1dedf..f13af84d4486664581e87d4a034aef0bad3a207a"
"shas": "76c6d036f7261edba34134b062f955e5357b3cea..61258786c65991addeda70afc16ae61061a31245"
}
,{
"testCaseDescription": "go-pointer-types-delete-replacement-test",
@ -413,183 +223,57 @@
"pointer-types.go": [
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
3
]
}
"replace": [
{
"start": [
5,
5
],
"end": [
5,
8
]
},
{
"start": [
5,
5
],
"end": [
5,
11
]
}
]
},
"summary": "Deleted the 'p1' identifier"
"summary": "Replaced the 'int' identifier with the 'string' identifier in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
2,
5
],
"end": [
2,
8
]
}
"replace": [
{
"start": [
6,
6
],
"end": [
6,
8
]
},
{
"start": [
6,
6
],
"end": [
6,
8
]
}
]
},
"summary": "Deleted the 'int' identifier"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
3,
3
]
}
},
"summary": "Deleted the 'p2' identifier"
},
{
"span": {
"delete": {
"start": [
3,
6
],
"end": [
3,
8
]
}
},
"summary": "Deleted the 'p3' identifier"
},
{
"span": {
"delete": {
"start": [
6,
1
],
"end": [
6,
3
]
}
},
"summary": "Deleted the 'p1' identifier"
},
{
"span": {
"delete": {
"start": [
6,
5
],
"end": [
6,
11
]
}
},
"summary": "Deleted the 'string' identifier"
},
{
"span": {
"delete": {
"start": [
7,
1
],
"end": [
7,
3
]
}
},
"summary": "Deleted the 'p2' identifier"
},
{
"span": {
"delete": {
"start": [
7,
6
],
"end": [
7,
8
]
}
},
"summary": "Deleted the 'p1' identifier"
},
{
"span": {
"insert": {
"start": [
6,
1
],
"end": [
6,
3
]
}
},
"summary": "Added the 'p1' identifier"
},
{
"span": {
"insert": {
"start": [
6,
5
],
"end": [
6,
8
]
}
},
"summary": "Added the 'int' identifier"
},
{
"span": {
"insert": {
"start": [
7,
1
],
"end": [
7,
3
]
}
},
"summary": "Added the 'p2' identifier"
},
{
"span": {
"insert": {
"start": [
7,
6
],
"end": [
7,
8
]
}
},
"summary": "Added the 'p3' identifier"
"summary": "Replaced the 'p3' identifier with the 'p1' identifier in the main function of the 'main' module"
}
]
},
@ -600,30 +284,25 @@
],
"patch": [
"diff --git a/pointer-types.go b/pointer-types.go",
"index 95e685d..4556eeb 100644",
"index 36eb5ff..98e7b8a 100644",
"--- a/pointer-types.go",
"+++ b/pointer-types.go",
"@@ -1,12 +1,8 @@",
"@@ -2,7 +2,7 @@ package main",
" ",
" func main() {",
" type (",
"-p1 *int",
"-p2 **p3",
"-)",
"-type (",
" p1 *string",
" p2 **p1",
"+p1 *string",
"+p2 **p1",
" )",
" type (",
"-p1 *string",
"-p2 **p1",
"+p1 *int",
"+p2 **p3",
" )"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "f13af84d4486664581e87d4a034aef0bad3a207a..1dfbf23712676794ded97d5e9a411ce7ce56fc17"
"shas": "61258786c65991addeda70afc16ae61061a31245..3ca15b2704b5e71efc71614eba4325dbb7fec7cb"
}
,{
"testCaseDescription": "go-pointer-types-delete-test",
"testCaseDescription": "go-pointer-types-delete-insert-test",
"expectedResult": {
"changes": {
"pointer-types.go": [
@ -631,61 +310,61 @@
"span": {
"delete": {
"start": [
2,
5,
1
],
"end": [
2,
5,
3
]
}
},
"summary": "Deleted the 'p1' identifier"
"summary": "Deleted the 'p1' identifier in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
2,
5,
5
],
"end": [
2,
5,
11
]
}
},
"summary": "Deleted the 'string' identifier"
"summary": "Deleted the 'string' identifier in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
3,
6,
1
],
"end": [
3,
6,
3
]
}
},
"summary": "Deleted the 'p2' identifier"
"summary": "Deleted the 'p2' identifier in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
3,
6,
6
],
"end": [
3,
6,
8
]
}
},
"summary": "Deleted the 'p1' identifier"
"summary": "Deleted the 'p1' identifier in the main function of the 'main' module"
}
]
},
@ -696,24 +375,25 @@
],
"patch": [
"diff --git a/pointer-types.go b/pointer-types.go",
"index 4556eeb..5d13f48 100644",
"index 98e7b8a..7905807 100644",
"--- a/pointer-types.go",
"+++ b/pointer-types.go",
"@@ -1,8 +1,4 @@",
" type (",
"@@ -1,8 +1,5 @@",
" package main",
" ",
" func main() {",
"-type (",
"-p1 *string",
"-p2 **p1",
"-)",
"-type (",
" p1 *int",
" p2 **p3",
" )"
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "1dfbf23712676794ded97d5e9a411ce7ce56fc17..d8ac0c302b514259999149901eb3c217040e7407"
"shas": "3ca15b2704b5e71efc71614eba4325dbb7fec7cb..e0748e889379afed8d7eaf216d1f0b3f430843aa"
}
,{
"testCaseDescription": "go-pointer-types-delete-rest-test",
"testCaseDescription": "go-pointer-types-teardown-test",
"expectedResult": {
"changes": {
"pointer-types.go": [
@ -721,61 +401,16 @@
"span": {
"delete": {
"start": [
2,
1,
1
],
"end": [
2,
3
]
}
},
"summary": "Deleted the 'p1' identifier"
},
{
"span": {
"delete": {
"start": [
2,
5
],
"end": [
2,
8
]
}
},
"summary": "Deleted the 'int' identifier"
},
{
"span": {
"delete": {
"start": [
3,
6,
1
],
"end": [
3,
3
]
}
},
"summary": "Deleted the 'p2' identifier"
},
{
"span": {
"delete": {
"start": [
3,
6
],
"end": [
3,
8
]
}
},
"summary": "Deleted the 'p3' identifier"
"summary": "Deleted the 'main' module"
}
]
},
@ -786,15 +421,16 @@
],
"patch": [
"diff --git a/pointer-types.go b/pointer-types.go",
"index 5d13f48..e69de29 100644",
"index 7905807..e69de29 100644",
"--- a/pointer-types.go",
"+++ b/pointer-types.go",
"@@ -1,4 +0,0 @@",
"-type (",
"-p1 *int",
"-p2 **p3",
"-)"
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "d8ac0c302b514259999149901eb3c217040e7407..043e40fb43f738d1d0ddd89c38bc83159bcc7a8f"
"shas": "e0748e889379afed8d7eaf216d1f0b3f430843aa..bcef36b3a5786f5961fd48ea956dc344efdfa8c4"
}]

View File

@ -1,4 +1,46 @@
[{
"testCaseDescription": "go-qualified-types-setup-test",
"expectedResult": {
"changes": {
"qualified-types.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"qualified-types.go"
],
"patch": [
"diff --git a/qualified-types.go b/qualified-types.go",
"index e69de29..7905807 100644",
"--- a/qualified-types.go",
"+++ b/qualified-types.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "a2ecc6ebae77d3db68e1aa65cbddf0b97039bb48..0822b5754f2bdf73a089244503430f27ab060b82"
}
,{
"testCaseDescription": "go-qualified-types-insert-test",
"expectedResult": {
"changes": {
@ -7,46 +49,46 @@
"span": {
"insert": {
"start": [
1,
4,
6
],
"end": [
1,
4,
7
]
}
},
"summary": "Added the 'a' identifier"
"summary": "Added the 'a' identifier in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
1,
4,
8
],
"end": [
1,
4,
9
]
}
},
"summary": "Added the 'b' identifier"
"summary": "Added the 'b' identifier in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
1,
4,
10
],
"end": [
1,
4,
11
]
}
},
"summary": "Added the 'c' identifier"
"summary": "Added the 'c' identifier in the main function of the 'main' module"
}
]
},
@ -57,236 +99,19 @@
],
"patch": [
"diff --git a/qualified-types.go b/qualified-types.go",
"index e69de29..7840cac 100644",
"index 7905807..e03cf22 100644",
"--- a/qualified-types.go",
"+++ b/qualified-types.go",
"@@ -0,0 +1 @@",
"+type a b.c"
],
"gitDir": "test/corpus/repos/go",
"shas": "a5b8a6804181af3a1387f9a23e3f85c44ddb6082..1534853219b560e38a40a23b1f54b3791e78a6a8"
}
,{
"testCaseDescription": "go-qualified-types-replacement-insert-test",
"expectedResult": {
"changes": {
"qualified-types.go": [
{
"span": {
"insert": {
"start": [
1,
6
],
"end": [
1,
7
]
}
},
"summary": "Added the 'x' identifier"
},
{
"span": {
"insert": {
"start": [
1,
8
],
"end": [
1,
9
]
}
},
"summary": "Added the 'y' identifier"
},
{
"span": {
"insert": {
"start": [
1,
10
],
"end": [
1,
11
]
}
},
"summary": "Added the 'z' identifier"
},
{
"span": {
"insert": {
"start": [
2,
6
],
"end": [
2,
7
]
}
},
"summary": "Added the 'a' identifier"
},
{
"span": {
"insert": {
"start": [
2,
8
],
"end": [
2,
9
]
}
},
"summary": "Added the 'b' identifier"
},
{
"span": {
"insert": {
"start": [
2,
10
],
"end": [
2,
11
]
}
},
"summary": "Added the 'c' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"qualified-types.go"
],
"patch": [
"diff --git a/qualified-types.go b/qualified-types.go",
"index 7840cac..0256b29 100644",
"--- a/qualified-types.go",
"+++ b/qualified-types.go",
"@@ -1 +1,3 @@",
"+type x y.z",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-",
"+type a b.c",
" type a b.c"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "1534853219b560e38a40a23b1f54b3791e78a6a8..9a0469bb91c527b8c2d07f8ec53ab8cdfcf7bd9f"
}
,{
"testCaseDescription": "go-qualified-types-delete-insert-test",
"expectedResult": {
"changes": {
"qualified-types.go": [
{
"span": {
"replace": [
{
"start": [
1,
6
],
"end": [
1,
7
]
},
{
"start": [
1,
6
],
"end": [
1,
7
]
}
]
},
"summary": "Replaced the 'x' identifier with the 'a' identifier"
},
{
"span": {
"replace": [
{
"start": [
1,
8
],
"end": [
1,
9
]
},
{
"start": [
1,
8
],
"end": [
1,
9
]
}
]
},
"summary": "Replaced the 'y' identifier with the 'b' identifier"
},
{
"span": {
"replace": [
{
"start": [
1,
10
],
"end": [
1,
11
]
},
{
"start": [
1,
10
],
"end": [
1,
11
]
}
]
},
"summary": "Replaced the 'z' identifier with the 'c' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"qualified-types.go"
],
"patch": [
"diff --git a/qualified-types.go b/qualified-types.go",
"index 0256b29..e963dfd 100644",
"--- a/qualified-types.go",
"+++ b/qualified-types.go",
"@@ -1,3 +1,3 @@",
"-type x y.z",
"+type a b.c",
" type a b.c",
" type a b.c"
],
"gitDir": "test/corpus/repos/go",
"shas": "9a0469bb91c527b8c2d07f8ec53ab8cdfcf7bd9f..da94ab3ccc5de8e4a034254dbe2909d2b8fa9626"
"shas": "0822b5754f2bdf73a089244503430f27ab060b82..0b1994c7aeeb5586474bb611fd5ea83b4fe791f1"
}
,{
"testCaseDescription": "go-qualified-types-replacement-test",
@ -298,81 +123,81 @@
"replace": [
{
"start": [
1,
4,
6
],
"end": [
1,
4,
7
]
},
{
"start": [
1,
4,
6
],
"end": [
1,
4,
7
]
}
]
},
"summary": "Replaced the 'a' identifier with the 'x' identifier"
"summary": "Replaced the 'a' identifier with the 'x' identifier in the main function of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
1,
4,
8
],
"end": [
1,
4,
9
]
},
{
"start": [
1,
4,
8
],
"end": [
1,
4,
9
]
}
]
},
"summary": "Replaced the 'b' identifier with the 'y' identifier"
"summary": "Replaced the 'b' identifier with the 'y' identifier in the main function of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
1,
4,
10
],
"end": [
1,
4,
11
]
},
{
"start": [
1,
4,
10
],
"end": [
1,
4,
11
]
}
]
},
"summary": "Replaced the 'c' identifier with the 'z' identifier"
"summary": "Replaced the 'c' identifier with the 'z' identifier in the main function of the 'main' module"
}
]
},
@ -383,17 +208,19 @@
],
"patch": [
"diff --git a/qualified-types.go b/qualified-types.go",
"index e963dfd..0256b29 100644",
"index e03cf22..241e526 100644",
"--- a/qualified-types.go",
"+++ b/qualified-types.go",
"@@ -1,3 +1,3 @@",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-type a b.c",
"+type x y.z",
" type a b.c",
" type a b.c"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "da94ab3ccc5de8e4a034254dbe2909d2b8fa9626..d75d90717c183e1beaefacd4e4531d6d7da64316"
"shas": "0b1994c7aeeb5586474bb611fd5ea83b4fe791f1..01c70a726bcb89fa0795238150233db558d34ddc"
}
,{
"testCaseDescription": "go-qualified-types-delete-replacement-test",
@ -402,138 +229,84 @@
"qualified-types.go": [
{
"span": {
"delete": {
"start": [
1,
6
],
"end": [
1,
7
]
}
"replace": [
{
"start": [
4,
6
],
"end": [
4,
7
]
},
{
"start": [
4,
6
],
"end": [
4,
7
]
}
]
},
"summary": "Deleted the 'x' identifier"
"summary": "Replaced the 'x' identifier with the 'a' identifier in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
1,
8
],
"end": [
1,
9
]
}
"replace": [
{
"start": [
4,
8
],
"end": [
4,
9
]
},
{
"start": [
4,
8
],
"end": [
4,
9
]
}
]
},
"summary": "Deleted the 'y' identifier"
"summary": "Replaced the 'y' identifier with the 'b' identifier in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
1,
10
],
"end": [
1,
11
]
}
"replace": [
{
"start": [
4,
10
],
"end": [
4,
11
]
},
{
"start": [
4,
10
],
"end": [
4,
11
]
}
]
},
"summary": "Deleted the 'z' identifier"
},
{
"span": {
"delete": {
"start": [
2,
6
],
"end": [
2,
7
]
}
},
"summary": "Deleted the 'a' identifier"
},
{
"span": {
"delete": {
"start": [
2,
8
],
"end": [
2,
9
]
}
},
"summary": "Deleted the 'b' identifier"
},
{
"span": {
"delete": {
"start": [
2,
10
],
"end": [
2,
11
]
}
},
"summary": "Deleted the 'c' identifier"
},
{
"span": {
"insert": {
"start": [
2,
6
],
"end": [
2,
7
]
}
},
"summary": "Added the 'x' identifier"
},
{
"span": {
"insert": {
"start": [
2,
8
],
"end": [
2,
9
]
}
},
"summary": "Added the 'y' identifier"
},
{
"span": {
"insert": {
"start": [
2,
10
],
"end": [
2,
11
]
}
},
"summary": "Added the 'z' identifier"
"summary": "Replaced the 'z' identifier with the 'c' identifier in the main function of the 'main' module"
}
]
},
@ -544,20 +317,22 @@
],
"patch": [
"diff --git a/qualified-types.go b/qualified-types.go",
"index 0256b29..4525e0a 100644",
"index 241e526..e03cf22 100644",
"--- a/qualified-types.go",
"+++ b/qualified-types.go",
"@@ -1,3 +1,2 @@",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-type x y.z",
"-type a b.c",
" type a b.c",
"+type x y.z"
"+type a b.c",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "d75d90717c183e1beaefacd4e4531d6d7da64316..40fe32e2e038391f91cb6a8e14ac554e222e1465"
"shas": "01c70a726bcb89fa0795238150233db558d34ddc..1dbe5e2299d5187baf6884f1e33a9866916787ee"
}
,{
"testCaseDescription": "go-qualified-types-delete-test",
"testCaseDescription": "go-qualified-types-delete-insert-test",
"expectedResult": {
"changes": {
"qualified-types.go": [
@ -565,46 +340,46 @@
"span": {
"delete": {
"start": [
1,
4,
6
],
"end": [
1,
4,
7
]
}
},
"summary": "Deleted the 'a' identifier"
"summary": "Deleted the 'a' identifier in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
1,
4,
8
],
"end": [
1,
4,
9
]
}
},
"summary": "Deleted the 'b' identifier"
"summary": "Deleted the 'b' identifier in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
1,
4,
10
],
"end": [
1,
4,
11
]
}
},
"summary": "Deleted the 'c' identifier"
"summary": "Deleted the 'c' identifier in the main function of the 'main' module"
}
]
},
@ -615,18 +390,22 @@
],
"patch": [
"diff --git a/qualified-types.go b/qualified-types.go",
"index 4525e0a..f31a963 100644",
"index e03cf22..7905807 100644",
"--- a/qualified-types.go",
"+++ b/qualified-types.go",
"@@ -1,2 +1 @@",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-type a b.c",
" type x y.z"
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "40fe32e2e038391f91cb6a8e14ac554e222e1465..3cd11bed0abcaeb3d4ce762dc40ef452183e6768"
"shas": "1dbe5e2299d5187baf6884f1e33a9866916787ee..7f3e0e134bb72c99bf1cfbd46b682f68ce878cd2"
}
,{
"testCaseDescription": "go-qualified-types-delete-rest-test",
"testCaseDescription": "go-qualified-types-teardown-test",
"expectedResult": {
"changes": {
"qualified-types.go": [
@ -635,45 +414,15 @@
"delete": {
"start": [
1,
6
1
],
"end": [
1,
7
6,
1
]
}
},
"summary": "Deleted the 'x' identifier"
},
{
"span": {
"delete": {
"start": [
1,
8
],
"end": [
1,
9
]
}
},
"summary": "Deleted the 'y' identifier"
},
{
"span": {
"delete": {
"start": [
1,
10
],
"end": [
1,
11
]
}
},
"summary": "Deleted the 'z' identifier"
"summary": "Deleted the 'main' module"
}
]
},
@ -684,12 +433,16 @@
],
"patch": [
"diff --git a/qualified-types.go b/qualified-types.go",
"index f31a963..e69de29 100644",
"index 7905807..e69de29 100644",
"--- a/qualified-types.go",
"+++ b/qualified-types.go",
"@@ -1 +0,0 @@",
"-type x y.z"
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "3cd11bed0abcaeb3d4ce762dc40ef452183e6768..4605c9308ffc84f9d63dc5e62562b0461d53d5b9"
"shas": "7f3e0e134bb72c99bf1cfbd46b682f68ce878cd2..b2decfa67a83e49a4d1eded0e91148f44e6530f5"
}]

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,46 @@
[{
"testCaseDescription": "go-select-statements-setup-test",
"expectedResult": {
"changes": {
"select-statements.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"select-statements.go"
],
"patch": [
"diff --git a/select-statements.go b/select-statements.go",
"index e69de29..7905807 100644",
"--- a/select-statements.go",
"+++ b/select-statements.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "6c4bbf5ef2baa704f1ff867d5d50d05e955555a3..4c8c010db1652331e4c40fd2e1eadb4a4092d7b5"
}
,{
"testCaseDescription": "go-select-statements-insert-test",
"expectedResult": {
"changes": {
@ -7,16 +49,16 @@
"span": {
"insert": {
"start": [
1,
4,
1
],
"end": [
10,
13,
2
]
}
},
"summary": "Added a select statement"
"summary": "Added a select statement in the main function of the 'main' module"
}
]
},
@ -27,82 +69,14 @@
],
"patch": [
"diff --git a/select-statements.go b/select-statements.go",
"index e69de29..7fe1c0b 100644",
"index 7905807..6806fa6 100644",
"--- a/select-statements.go",
"+++ b/select-statements.go",
"@@ -0,0 +1,10 @@",
"+select {",
"+ case x := <-c:",
"+ println(x)",
"+ case y <- c:",
"+ println(5)",
"+ case <-time.After(1):",
"+ println(6)",
"+ default:",
"+ return",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "c02f9252b66f4d334e7e4d5cc2b56665c5d0b45f..2b2fbf697988912a16c858851710652dae25a559"
}
,{
"testCaseDescription": "go-select-statements-replacement-insert-test",
"expectedResult": {
"changes": {
"select-statements.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
10,
2
]
}
},
"summary": "Added a select statement"
},
{
"span": {
"insert": {
"start": [
11,
1
],
"end": [
20,
2
]
}
},
"summary": "Added a select statement"
}
]
},
"errors": {}
},
"filePaths": [
"select-statements.go"
],
"patch": [
"diff --git a/select-statements.go b/select-statements.go",
"index 7fe1c0b..1403fc7 100644",
"--- a/select-statements.go",
"+++ b/select-statements.go",
"@@ -1,4 +1,24 @@",
" select {",
"+ case a := <-c:",
"+ println(x)",
"+ case b <- c:",
"+ println(5)",
"+ case <-time.After(2):",
"+ println(6)",
"+ default:",
"+ return",
"+}",
"@@ -1,5 +1,14 @@",
" package main",
" ",
" func main() {",
"-",
"+select {",
"+ case x := <-c:",
"+ println(x)",
@ -113,128 +87,10 @@
"+ default:",
"+ return",
"+}",
"+select {",
" case x := <-c:",
" println(x)",
" case y <- c:"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "2b2fbf697988912a16c858851710652dae25a559..983b410af87ea7510331b9acfece407fa4388e09"
}
,{
"testCaseDescription": "go-select-statements-delete-insert-test",
"expectedResult": {
"changes": {
"select-statements.go": [
{
"span": {
"replace": [
{
"start": [
2,
8
],
"end": [
2,
9
]
},
{
"start": [
2,
8
],
"end": [
2,
9
]
}
]
},
"summary": "Replaced the 'a' identifier with the 'x' identifier"
},
{
"span": {
"replace": [
{
"start": [
4,
8
],
"end": [
4,
9
]
},
{
"start": [
4,
8
],
"end": [
4,
9
]
}
]
},
"summary": "Replaced the 'b' identifier with the 'y' identifier"
},
{
"span": {
"replace": [
{
"start": [
6,
21
],
"end": [
6,
22
]
},
{
"start": [
6,
21
],
"end": [
6,
22
]
}
]
},
"summary": "Replaced '2' with '1'"
}
]
},
"errors": {}
},
"filePaths": [
"select-statements.go"
],
"patch": [
"diff --git a/select-statements.go b/select-statements.go",
"index 1403fc7..3e83983 100644",
"--- a/select-statements.go",
"+++ b/select-statements.go",
"@@ -1,9 +1,9 @@",
" select {",
"- case a := <-c:",
"+ case x := <-c:",
" println(x)",
"- case b <- c:",
"+ case y <- c:",
" println(5)",
"- case <-time.After(2):",
"+ case <-time.After(1):",
" println(6)",
" default:",
" return"
],
"gitDir": "test/corpus/repos/go",
"shas": "983b410af87ea7510331b9acfece407fa4388e09..a23994405fb8e283ccb2d2c95074563cceb23b83"
"shas": "4c8c010db1652331e4c40fd2e1eadb4a4092d7b5..b401615c00ea4775b683c559371a39d5928e6cf7"
}
,{
"testCaseDescription": "go-select-statements-replacement-test",
@ -246,81 +102,81 @@
"replace": [
{
"start": [
2,
5,
8
],
"end": [
2,
5,
9
]
},
{
"start": [
2,
5,
8
],
"end": [
2,
5,
9
]
}
]
},
"summary": "Replaced the 'x' identifier with the 'a' identifier"
"summary": "Replaced the 'x' identifier with the 'a' identifier in the main function of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
4,
7,
8
],
"end": [
4,
7,
9
]
},
{
"start": [
4,
7,
8
],
"end": [
4,
7,
9
]
}
]
},
"summary": "Replaced the 'y' identifier with the 'b' identifier"
"summary": "Replaced the 'y' identifier with the 'b' identifier in the main function of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
6,
9,
21
],
"end": [
6,
9,
22
]
},
{
"start": [
6,
9,
21
],
"end": [
6,
9,
22
]
}
]
},
"summary": "Replaced '1' with '2'"
"summary": "Replaced '1' with '2' in the main function of the 'main' module"
}
]
},
@ -331,10 +187,12 @@
],
"patch": [
"diff --git a/select-statements.go b/select-statements.go",
"index 3e83983..1403fc7 100644",
"index 6806fa6..1ca26fb 100644",
"--- a/select-statements.go",
"+++ b/select-statements.go",
"@@ -1,9 +1,9 @@",
"@@ -2,11 +2,11 @@ package main",
" ",
" func main() {",
" select {",
"- case x := <-c:",
"+ case a := <-c:",
@ -349,7 +207,7 @@
" return"
],
"gitDir": "test/corpus/repos/go",
"shas": "a23994405fb8e283ccb2d2c95074563cceb23b83..3f72a17c112bb126b288f9683109d13f918567e6"
"shas": "b401615c00ea4775b683c559371a39d5928e6cf7..0b36da542c866161924a1bedb257bfd1ad6212b3"
}
,{
"testCaseDescription": "go-select-statements-delete-replacement-test",
@ -358,48 +216,84 @@
"select-statements.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
10,
2
]
}
"replace": [
{
"start": [
5,
8
],
"end": [
5,
9
]
},
{
"start": [
5,
8
],
"end": [
5,
9
]
}
]
},
"summary": "Deleted a select statement"
"summary": "Replaced the 'a' identifier with the 'x' identifier in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
11,
1
],
"end": [
20,
2
]
}
"replace": [
{
"start": [
7,
8
],
"end": [
7,
9
]
},
{
"start": [
7,
8
],
"end": [
7,
9
]
}
]
},
"summary": "Deleted a select statement"
"summary": "Replaced the 'b' identifier with the 'y' identifier in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
11,
1
],
"end": [
20,
2
]
}
"replace": [
{
"start": [
9,
21
],
"end": [
9,
22
]
},
{
"start": [
9,
21
],
"end": [
9,
22
]
}
]
},
"summary": "Added a select statement"
"summary": "Replaced '2' with '1' in the main function of the 'main' module"
}
]
},
@ -410,45 +304,30 @@
],
"patch": [
"diff --git a/select-statements.go b/select-statements.go",
"index 1403fc7..234dd89 100644",
"index 1ca26fb..6806fa6 100644",
"--- a/select-statements.go",
"+++ b/select-statements.go",
"@@ -1,14 +1,4 @@",
"@@ -2,11 +2,11 @@ package main",
" ",
" func main() {",
" select {",
"- case a := <-c:",
"- println(x)",
"+ case x := <-c:",
" println(x)",
"- case b <- c:",
"- println(5)",
"- case <-time.After(2):",
"- println(6)",
"- default:",
"- return",
"-}",
"-select {",
" case x := <-c:",
" println(x)",
" case y <- c:",
"@@ -19,11 +9,11 @@ select {",
" return",
" }",
" select {",
"- case x := <-c:",
"+ case a := <-c:",
" println(x)",
"- case y <- c:",
"+ case b <- c:",
"+ case y <- c:",
" println(5)",
"- case <-time.After(1):",
"+ case <-time.After(2):",
"- case <-time.After(2):",
"+ case <-time.After(1):",
" println(6)",
" default:",
" return"
],
"gitDir": "test/corpus/repos/go",
"shas": "3f72a17c112bb126b288f9683109d13f918567e6..9d5bc8c2e6e70762403f8a1f02ac863410533023"
"shas": "0b36da542c866161924a1bedb257bfd1ad6212b3..bc0c78034dc5d8e13f86b7191372d167a650d42d"
}
,{
"testCaseDescription": "go-select-statements-delete-test",
"testCaseDescription": "go-select-statements-delete-insert-test",
"expectedResult": {
"changes": {
"select-statements.go": [
@ -456,16 +335,16 @@
"span": {
"delete": {
"start": [
1,
4,
1
],
"end": [
10,
13,
2
]
}
},
"summary": "Deleted a select statement"
"summary": "Deleted a select statement in the main function of the 'main' module"
}
]
},
@ -476,11 +355,14 @@
],
"patch": [
"diff --git a/select-statements.go b/select-statements.go",
"index 234dd89..d513030 100644",
"index 6806fa6..7905807 100644",
"--- a/select-statements.go",
"+++ b/select-statements.go",
"@@ -1,14 +1,4 @@",
" select {",
"@@ -1,14 +1,5 @@",
" package main",
" ",
" func main() {",
"-select {",
"- case x := <-c:",
"- println(x)",
"- case y <- c:",
@ -490,16 +372,14 @@
"- default:",
"- return",
"-}",
"-select {",
" case a := <-c:",
" println(x)",
" case b <- c:"
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "9d5bc8c2e6e70762403f8a1f02ac863410533023..30985a629ade98c4fde5bf79a200bd2697dc9d9f"
"shas": "bc0c78034dc5d8e13f86b7191372d167a650d42d..c16c6641b7a4c25c9dddd3d442c5efdbb0ef0808"
}
,{
"testCaseDescription": "go-select-statements-delete-rest-test",
"testCaseDescription": "go-select-statements-teardown-test",
"expectedResult": {
"changes": {
"select-statements.go": [
@ -511,12 +391,12 @@
1
],
"end": [
10,
2
6,
1
]
}
},
"summary": "Deleted a select statement"
"summary": "Deleted the 'main' module"
}
]
},
@ -527,21 +407,16 @@
],
"patch": [
"diff --git a/select-statements.go b/select-statements.go",
"index d513030..e69de29 100644",
"index 7905807..e69de29 100644",
"--- a/select-statements.go",
"+++ b/select-statements.go",
"@@ -1,10 +0,0 @@",
"-select {",
"- case a := <-c:",
"- println(x)",
"- case b <- c:",
"- println(5)",
"- case <-time.After(2):",
"- println(6)",
"- default:",
"- return",
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "30985a629ade98c4fde5bf79a200bd2697dc9d9f..201c2f06d17d14e12c9861e2a94372fc41441178"
"shas": "c16c6641b7a4c25c9dddd3d442c5efdbb0ef0808..f1209a78afa8affbb1beab49835ca3220a10c4da"
}]

View File

@ -1,4 +1,46 @@
[{
"testCaseDescription": "go-selector-expressions-setup-test",
"expectedResult": {
"changes": {
"selector-expressions.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"selector-expressions.go"
],
"patch": [
"diff --git a/selector-expressions.go b/selector-expressions.go",
"index e69de29..7905807 100644",
"--- a/selector-expressions.go",
"+++ b/selector-expressions.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "e3fdc3dffa62a0c8db531accad41fd5b55963868..2002d828a1380988508edd537ca3864e1ef48aa0"
}
,{
"testCaseDescription": "go-selector-expressions-insert-test",
"expectedResult": {
"changes": {
@ -7,16 +49,16 @@
"span": {
"insert": {
"start": [
1,
4,
1
],
"end": [
1,
4,
8
]
}
},
"summary": "Added the 'a[b][c]()' function call"
"summary": "Added the 'a[b][c]()' function call in the main function of the 'main' module"
}
]
},
@ -27,176 +69,19 @@
],
"patch": [
"diff --git a/selector-expressions.go b/selector-expressions.go",
"index e69de29..7be43f2 100644",
"index 7905807..8b4c745 100644",
"--- a/selector-expressions.go",
"+++ b/selector-expressions.go",
"@@ -0,0 +1 @@",
"+a.b.c()"
],
"gitDir": "test/corpus/repos/go",
"shas": "b8520b47d7e23a8b805613ba5e28d123748a7e86..53e9575bb4a95b6a13a9289b3cb198389c3c5018"
}
,{
"testCaseDescription": "go-selector-expressions-replacement-insert-test",
"expectedResult": {
"changes": {
"selector-expressions.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
8
]
}
},
"summary": "Added the 'x[y][z]()' function call"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
8
]
}
},
"summary": "Added the 'a[b][c]()' function call"
}
]
},
"errors": {}
},
"filePaths": [
"selector-expressions.go"
],
"patch": [
"diff --git a/selector-expressions.go b/selector-expressions.go",
"index 7be43f2..4fa8605 100644",
"--- a/selector-expressions.go",
"+++ b/selector-expressions.go",
"@@ -1 +1,3 @@",
"+x.y.z()",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-",
"+a.b.c()",
" a.b.c()"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "53e9575bb4a95b6a13a9289b3cb198389c3c5018..05337c7344ffd11906be9b6603043c1bcf0f7dff"
}
,{
"testCaseDescription": "go-selector-expressions-delete-insert-test",
"expectedResult": {
"changes": {
"selector-expressions.go": [
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
2
]
},
{
"start": [
1,
1
],
"end": [
1,
2
]
}
]
},
"summary": "Replaced the 'x' identifier with the 'a' identifier in the a[b] subscript access"
},
{
"span": {
"replace": [
{
"start": [
1,
3
],
"end": [
1,
4
]
},
{
"start": [
1,
3
],
"end": [
1,
4
]
}
]
},
"summary": "Replaced the 'y' identifier with the 'b' identifier in the a[b] subscript access"
},
{
"span": {
"replace": [
{
"start": [
1,
5
],
"end": [
1,
6
]
},
{
"start": [
1,
5
],
"end": [
1,
6
]
}
]
},
"summary": "Replaced the 'z' identifier with the 'c' identifier in the a[b][c] subscript access"
}
]
},
"errors": {}
},
"filePaths": [
"selector-expressions.go"
],
"patch": [
"diff --git a/selector-expressions.go b/selector-expressions.go",
"index 4fa8605..2a586da 100644",
"--- a/selector-expressions.go",
"+++ b/selector-expressions.go",
"@@ -1,3 +1,3 @@",
"-x.y.z()",
"+a.b.c()",
" a.b.c()",
" a.b.c()"
],
"gitDir": "test/corpus/repos/go",
"shas": "05337c7344ffd11906be9b6603043c1bcf0f7dff..4bcafdd401ffbfb0e29802793ed59f20908986a6"
"shas": "2002d828a1380988508edd537ca3864e1ef48aa0..f884237bce6d0fa844361b817c5bc81f29562335"
}
,{
"testCaseDescription": "go-selector-expressions-replacement-test",
@ -208,81 +93,81 @@
"replace": [
{
"start": [
1,
4,
1
],
"end": [
1,
4,
2
]
},
{
"start": [
1,
4,
1
],
"end": [
1,
4,
2
]
}
]
},
"summary": "Replaced the 'a' identifier with the 'x' identifier in the x[y] subscript access"
"summary": "Replaced the 'a' identifier with the 'x' identifier in the x[y] subscript access of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
1,
4,
3
],
"end": [
1,
4,
4
]
},
{
"start": [
1,
4,
3
],
"end": [
1,
4,
4
]
}
]
},
"summary": "Replaced the 'b' identifier with the 'y' identifier in the x[y] subscript access"
"summary": "Replaced the 'b' identifier with the 'y' identifier in the x[y] subscript access of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
1,
4,
5
],
"end": [
1,
4,
6
]
},
{
"start": [
1,
4,
5
],
"end": [
1,
4,
6
]
}
]
},
"summary": "Replaced the 'c' identifier with the 'z' identifier in the x[y][z] subscript access"
"summary": "Replaced the 'c' identifier with the 'z' identifier in the x[y][z] subscript access of the 'main' function"
}
]
},
@ -293,17 +178,19 @@
],
"patch": [
"diff --git a/selector-expressions.go b/selector-expressions.go",
"index 2a586da..4fa8605 100644",
"index 8b4c745..0e519e3 100644",
"--- a/selector-expressions.go",
"+++ b/selector-expressions.go",
"@@ -1,3 +1,3 @@",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-a.b.c()",
"+x.y.z()",
" a.b.c()",
" a.b.c()"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "4bcafdd401ffbfb0e29802793ed59f20908986a6..1763e869f9b7050dc5703f293808233c46910062"
"shas": "f884237bce6d0fa844361b817c5bc81f29562335..f4045ad90b4842beaa301d815a34815f5de52729"
}
,{
"testCaseDescription": "go-selector-expressions-delete-replacement-test",
@ -312,48 +199,84 @@
"selector-expressions.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
8
]
}
"replace": [
{
"start": [
4,
1
],
"end": [
4,
2
]
},
{
"start": [
4,
1
],
"end": [
4,
2
]
}
]
},
"summary": "Deleted the 'x[y][z]()' function call"
"summary": "Replaced the 'x' identifier with the 'a' identifier in the a[b] subscript access of the 'main' function"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
8
]
}
"replace": [
{
"start": [
4,
3
],
"end": [
4,
4
]
},
{
"start": [
4,
3
],
"end": [
4,
4
]
}
]
},
"summary": "Deleted the 'a[b][c]()' function call"
"summary": "Replaced the 'y' identifier with the 'b' identifier in the a[b] subscript access of the 'main' function"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
8
]
}
"replace": [
{
"start": [
4,
5
],
"end": [
4,
6
]
},
{
"start": [
4,
5
],
"end": [
4,
6
]
}
]
},
"summary": "Added the 'x[y][z]()' function call"
"summary": "Replaced the 'z' identifier with the 'c' identifier in the a[b][c] subscript access of the 'main' function"
}
]
},
@ -364,20 +287,65 @@
],
"patch": [
"diff --git a/selector-expressions.go b/selector-expressions.go",
"index 4fa8605..3e2d0bd 100644",
"index 0e519e3..8b4c745 100644",
"--- a/selector-expressions.go",
"+++ b/selector-expressions.go",
"@@ -1,3 +1,2 @@",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-x.y.z()",
"-a.b.c()",
" a.b.c()",
"+x.y.z()"
"+a.b.c()",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "1763e869f9b7050dc5703f293808233c46910062..562bbf82089ed1bc7d77c4698451746939455f51"
"shas": "f4045ad90b4842beaa301d815a34815f5de52729..773acf00766032b8d8322f504b4e4747c395d066"
}
,{
"testCaseDescription": "go-selector-expressions-delete-test",
"testCaseDescription": "go-selector-expressions-delete-insert-test",
"expectedResult": {
"changes": {
"selector-expressions.go": [
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
8
]
}
},
"summary": "Deleted the 'a[b][c]()' function call in the main function of the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"selector-expressions.go"
],
"patch": [
"diff --git a/selector-expressions.go b/selector-expressions.go",
"index 8b4c745..7905807 100644",
"--- a/selector-expressions.go",
"+++ b/selector-expressions.go",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-a.b.c()",
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "773acf00766032b8d8322f504b4e4747c395d066..f88c2c26129640ca4a0aa573fef59f03439a2a2a"
}
,{
"testCaseDescription": "go-selector-expressions-teardown-test",
"expectedResult": {
"changes": {
"selector-expressions.go": [
@ -389,51 +357,12 @@
1
],
"end": [
1,
8
]
}
},
"summary": "Deleted the 'a[b][c]()' function call"
}
]
},
"errors": {}
},
"filePaths": [
"selector-expressions.go"
],
"patch": [
"diff --git a/selector-expressions.go b/selector-expressions.go",
"index 3e2d0bd..00b9e7c 100644",
"--- a/selector-expressions.go",
"+++ b/selector-expressions.go",
"@@ -1,2 +1 @@",
"-a.b.c()",
" x.y.z()"
],
"gitDir": "test/corpus/repos/go",
"shas": "562bbf82089ed1bc7d77c4698451746939455f51..3ea379fb7d49d67e17b2bd53b58af0298c055ccc"
}
,{
"testCaseDescription": "go-selector-expressions-delete-rest-test",
"expectedResult": {
"changes": {
"selector-expressions.go": [
{
"span": {
"delete": {
"start": [
1,
6,
1
],
"end": [
1,
8
]
}
},
"summary": "Deleted the 'x[y][z]()' function call"
"summary": "Deleted the 'main' module"
}
]
},
@ -444,12 +373,16 @@
],
"patch": [
"diff --git a/selector-expressions.go b/selector-expressions.go",
"index 00b9e7c..e69de29 100644",
"index 7905807..e69de29 100644",
"--- a/selector-expressions.go",
"+++ b/selector-expressions.go",
"@@ -1 +0,0 @@",
"-x.y.z()"
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "3ea379fb7d49d67e17b2bd53b58af0298c055ccc..bef4b21e0fe9824b79e8b12bfa32867c8a4433a7"
"shas": "f88c2c26129640ca4a0aa573fef59f03439a2a2a..512f678e80270a7b8c148ffbf16d83ef76c20e46"
}]

View File

@ -1,4 +1,46 @@
[{
"testCaseDescription": "go-send-statements-setup-test",
"expectedResult": {
"changes": {
"send-statements.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"send-statements.go"
],
"patch": [
"diff --git a/send-statements.go b/send-statements.go",
"index e69de29..7905807 100644",
"--- a/send-statements.go",
"+++ b/send-statements.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "1c84cb51e325b0263f1b4b1aab41ebbacf00be1c..5f5e08e666d4afadea4d4e589d7227a8c3958210"
}
,{
"testCaseDescription": "go-send-statements-insert-test",
"expectedResult": {
"changes": {
@ -7,31 +49,31 @@
"span": {
"insert": {
"start": [
1,
4,
1
],
"end": [
1,
4,
4
]
}
},
"summary": "Added 'foo' identifier"
"summary": "Added 'foo' identifier in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
1,
4,
8
],
"end": [
1,
4,
9
]
}
},
"summary": "Added '5'"
"summary": "Added '5' in the main function of the 'main' module"
}
]
},
@ -42,179 +84,19 @@
],
"patch": [
"diff --git a/send-statements.go b/send-statements.go",
"index e69de29..9df974c 100644",
"index 7905807..5f327d1 100644",
"--- a/send-statements.go",
"+++ b/send-statements.go",
"@@ -0,0 +1 @@",
"+foo <- 5"
],
"gitDir": "test/corpus/repos/go",
"shas": "7fd6dea031e26a02c1743a205dc1489a7e050468..0c3bf2eda05dc415465ee2ed1bfe6ac87a0d41bd"
}
,{
"testCaseDescription": "go-send-statements-replacement-insert-test",
"expectedResult": {
"changes": {
"send-statements.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
4
]
}
},
"summary": "Added 'bar' identifier"
},
{
"span": {
"insert": {
"start": [
1,
8
],
"end": [
1,
9
]
}
},
"summary": "Added '6'"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
4
]
}
},
"summary": "Added 'foo' identifier"
},
{
"span": {
"insert": {
"start": [
2,
8
],
"end": [
2,
9
]
}
},
"summary": "Added '5'"
}
]
},
"errors": {}
},
"filePaths": [
"send-statements.go"
],
"patch": [
"diff --git a/send-statements.go b/send-statements.go",
"index 9df974c..de76cee 100644",
"--- a/send-statements.go",
"+++ b/send-statements.go",
"@@ -1 +1,3 @@",
"+bar <- 6",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-",
"+foo <- 5",
" foo <- 5"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "0c3bf2eda05dc415465ee2ed1bfe6ac87a0d41bd..abab5451f999eab126c0ad6f1312d732537d1685"
}
,{
"testCaseDescription": "go-send-statements-delete-insert-test",
"expectedResult": {
"changes": {
"send-statements.go": [
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
4
]
},
{
"start": [
1,
1
],
"end": [
1,
4
]
}
]
},
"summary": "Replaced the 'bar' identifier with the 'foo' identifier"
},
{
"span": {
"replace": [
{
"start": [
1,
8
],
"end": [
1,
9
]
},
{
"start": [
1,
8
],
"end": [
1,
9
]
}
]
},
"summary": "Replaced '6' with '5'"
}
]
},
"errors": {}
},
"filePaths": [
"send-statements.go"
],
"patch": [
"diff --git a/send-statements.go b/send-statements.go",
"index de76cee..d487575 100644",
"--- a/send-statements.go",
"+++ b/send-statements.go",
"@@ -1,3 +1,3 @@",
"-bar <- 6",
"+foo <- 5",
" foo <- 5",
" foo <- 5"
],
"gitDir": "test/corpus/repos/go",
"shas": "abab5451f999eab126c0ad6f1312d732537d1685..b88435c07e6bcc26a890ef52e2cc3a63b4ad2155"
"shas": "5f5e08e666d4afadea4d4e589d7227a8c3958210..877578a2b7fc5bf4cd8f033618447d4ed28d41de"
}
,{
"testCaseDescription": "go-send-statements-replacement-test",
@ -226,54 +108,54 @@
"replace": [
{
"start": [
1,
4,
1
],
"end": [
1,
4,
4
]
},
{
"start": [
1,
4,
1
],
"end": [
1,
4,
4
]
}
]
},
"summary": "Replaced the 'foo' identifier with the 'bar' identifier"
"summary": "Replaced the 'foo' identifier with the 'bar' identifier in the main function of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
1,
4,
8
],
"end": [
1,
4,
9
]
},
{
"start": [
1,
4,
8
],
"end": [
1,
4,
9
]
}
]
},
"summary": "Replaced '5' with '6'"
"summary": "Replaced '5' with '6' in the main function of the 'main' module"
}
]
},
@ -284,17 +166,19 @@
],
"patch": [
"diff --git a/send-statements.go b/send-statements.go",
"index d487575..de76cee 100644",
"index 5f327d1..3829478 100644",
"--- a/send-statements.go",
"+++ b/send-statements.go",
"@@ -1,3 +1,3 @@",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-foo <- 5",
"+bar <- 6",
" foo <- 5",
" foo <- 5"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "b88435c07e6bcc26a890ef52e2cc3a63b4ad2155..956a353953bd55204b2eb37fdc8727198208edc8"
"shas": "877578a2b7fc5bf4cd8f033618447d4ed28d41de..f28125f249f49c892ff0622cfe29c37dd59c77e3"
}
,{
"testCaseDescription": "go-send-statements-delete-replacement-test",
@ -303,93 +187,57 @@
"send-statements.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
4
]
}
"replace": [
{
"start": [
4,
1
],
"end": [
4,
4
]
},
{
"start": [
4,
1
],
"end": [
4,
4
]
}
]
},
"summary": "Deleted 'bar' identifier"
"summary": "Replaced the 'bar' identifier with the 'foo' identifier in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
1,
8
],
"end": [
1,
9
]
}
"replace": [
{
"start": [
4,
8
],
"end": [
4,
9
]
},
{
"start": [
4,
8
],
"end": [
4,
9
]
}
]
},
"summary": "Deleted '6'"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
4
]
}
},
"summary": "Deleted 'foo' identifier"
},
{
"span": {
"delete": {
"start": [
2,
8
],
"end": [
2,
9
]
}
},
"summary": "Deleted '5'"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
4
]
}
},
"summary": "Added 'bar' identifier"
},
{
"span": {
"insert": {
"start": [
2,
8
],
"end": [
2,
9
]
}
},
"summary": "Added '6'"
"summary": "Replaced '6' with '5' in the main function of the 'main' module"
}
]
},
@ -400,20 +248,80 @@
],
"patch": [
"diff --git a/send-statements.go b/send-statements.go",
"index de76cee..65a1c23 100644",
"index 3829478..5f327d1 100644",
"--- a/send-statements.go",
"+++ b/send-statements.go",
"@@ -1,3 +1,2 @@",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-bar <- 6",
"-foo <- 5",
" foo <- 5",
"+bar <- 6"
"+foo <- 5",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "956a353953bd55204b2eb37fdc8727198208edc8..6640556f9db698688695109406ffbdb65d89e298"
"shas": "f28125f249f49c892ff0622cfe29c37dd59c77e3..bb2c00d6bda5b3f736ad35673c3fad4fb888d151"
}
,{
"testCaseDescription": "go-send-statements-delete-test",
"testCaseDescription": "go-send-statements-delete-insert-test",
"expectedResult": {
"changes": {
"send-statements.go": [
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
4
]
}
},
"summary": "Deleted 'foo' identifier in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
4,
8
],
"end": [
4,
9
]
}
},
"summary": "Deleted '5' in the main function of the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"send-statements.go"
],
"patch": [
"diff --git a/send-statements.go b/send-statements.go",
"index 5f327d1..7905807 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": "bb2c00d6bda5b3f736ad35673c3fad4fb888d151..25caa27b647efa9f53f9bf976533349d737724b4"
}
,{
"testCaseDescription": "go-send-statements-teardown-test",
"expectedResult": {
"changes": {
"send-statements.go": [
@ -425,81 +333,12 @@
1
],
"end": [
1,
4
]
}
},
"summary": "Deleted 'foo' identifier"
},
{
"span": {
"delete": {
"start": [
1,
8
],
"end": [
1,
9
]
}
},
"summary": "Deleted '5'"
}
]
},
"errors": {}
},
"filePaths": [
"send-statements.go"
],
"patch": [
"diff --git a/send-statements.go b/send-statements.go",
"index 65a1c23..bab29cb 100644",
"--- a/send-statements.go",
"+++ b/send-statements.go",
"@@ -1,2 +1 @@",
"-foo <- 5",
" bar <- 6"
],
"gitDir": "test/corpus/repos/go",
"shas": "6640556f9db698688695109406ffbdb65d89e298..bd1886ba3d3f3e1fde4b18c020b346d71883ee9e"
}
,{
"testCaseDescription": "go-send-statements-delete-rest-test",
"expectedResult": {
"changes": {
"send-statements.go": [
{
"span": {
"delete": {
"start": [
1,
6,
1
],
"end": [
1,
4
]
}
},
"summary": "Deleted 'bar' identifier"
},
{
"span": {
"delete": {
"start": [
1,
8
],
"end": [
1,
9
]
}
},
"summary": "Deleted '6'"
"summary": "Deleted the 'main' module"
}
]
},
@ -510,12 +349,16 @@
],
"patch": [
"diff --git a/send-statements.go b/send-statements.go",
"index bab29cb..e69de29 100644",
"index 7905807..e69de29 100644",
"--- a/send-statements.go",
"+++ b/send-statements.go",
"@@ -1 +0,0 @@",
"-bar <- 6"
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "bd1886ba3d3f3e1fde4b18c020b346d71883ee9e..927f995f9a27002e1694b5d3ce66a7dbbfda6720"
"shas": "25caa27b647efa9f53f9bf976533349d737724b4..2b1d8061a7e48430bdcb277b2424bdefa6e67cf6"
}]

View File

@ -1,4 +1,46 @@
[{
"testCaseDescription": "go-short-var-declarations-setup-test",
"expectedResult": {
"changes": {
"short-var-declarations.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"short-var-declarations.go"
],
"patch": [
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
"index e69de29..7905807 100644",
"--- a/short-var-declarations.go",
"+++ b/short-var-declarations.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "c15f3eb2a6003ef78012d02db50d2926c02e07b0..a42c9334ed4b470f101430a74cd8e9c5b9328486"
}
,{
"testCaseDescription": "go-short-var-declarations-insert-test",
"expectedResult": {
"changes": {
@ -7,31 +49,31 @@
"span": {
"insert": {
"start": [
1,
4,
1
],
"end": [
1,
4,
13
]
}
},
"summary": "Added the 'a' variable"
"summary": "Added the 'a' variable in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
1,
4,
1
],
"end": [
1,
4,
13
]
}
},
"summary": "Added the 'b' variable"
"summary": "Added the 'b' variable in the main function of the 'main' module"
}
]
},
@ -42,233 +84,19 @@
],
"patch": [
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
"index e69de29..99b7041 100644",
"index 7905807..4ca1ce3 100644",
"--- a/short-var-declarations.go",
"+++ b/short-var-declarations.go",
"@@ -0,0 +1 @@",
"+a, b := 1, 2"
],
"gitDir": "test/corpus/repos/go",
"shas": "d77b70cb3981afaf807f3e56652ecd386101cb2b..923c4c5fcf1002927a78d428eefab190c7e2c730"
}
,{
"testCaseDescription": "go-short-var-declarations-replacement-insert-test",
"expectedResult": {
"changes": {
"short-var-declarations.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
13
]
}
},
"summary": "Added the 'x' variable"
},
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
13
]
}
},
"summary": "Added the 'y' variable"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
13
]
}
},
"summary": "Added the 'a' variable"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
13
]
}
},
"summary": "Added the 'b' variable"
}
]
},
"errors": {}
},
"filePaths": [
"short-var-declarations.go"
],
"patch": [
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
"index 99b7041..220aab8 100644",
"--- a/short-var-declarations.go",
"+++ b/short-var-declarations.go",
"@@ -1 +1,3 @@",
"+x, y := 3, 4",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-",
"+a, b := 1, 2",
" a, b := 1, 2"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "923c4c5fcf1002927a78d428eefab190c7e2c730..62e0fff2590e53bca217d3b3fb46c7f6f86822c1"
}
,{
"testCaseDescription": "go-short-var-declarations-delete-insert-test",
"expectedResult": {
"changes": {
"short-var-declarations.go": [
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
2
]
},
{
"start": [
1,
1
],
"end": [
1,
2
]
}
]
},
"summary": "Replaced the 'x' identifier with the 'a' identifier in the a variable"
},
{
"span": {
"replace": [
{
"start": [
1,
9
],
"end": [
1,
10
]
},
{
"start": [
1,
9
],
"end": [
1,
10
]
}
]
},
"summary": "Replaced '3' with '1' in the a variable"
},
{
"span": {
"replace": [
{
"start": [
1,
4
],
"end": [
1,
5
]
},
{
"start": [
1,
4
],
"end": [
1,
5
]
}
]
},
"summary": "Replaced the 'y' identifier with the 'b' identifier in the b variable"
},
{
"span": {
"replace": [
{
"start": [
1,
12
],
"end": [
1,
13
]
},
{
"start": [
1,
12
],
"end": [
1,
13
]
}
]
},
"summary": "Replaced '4' with '2' in the b variable"
}
]
},
"errors": {}
},
"filePaths": [
"short-var-declarations.go"
],
"patch": [
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
"index 220aab8..96ba966 100644",
"--- a/short-var-declarations.go",
"+++ b/short-var-declarations.go",
"@@ -1,3 +1,3 @@",
"-x, y := 3, 4",
"+a, b := 1, 2",
" a, b := 1, 2",
" a, b := 1, 2"
],
"gitDir": "test/corpus/repos/go",
"shas": "62e0fff2590e53bca217d3b3fb46c7f6f86822c1..ca28a3beeb3b19e152ad702d5c8ba7d4abcb87e2"
"shas": "a42c9334ed4b470f101430a74cd8e9c5b9328486..aade853eedaea06249909ca54b03636ca7b5b300"
}
,{
"testCaseDescription": "go-short-var-declarations-replacement-test",
@ -280,108 +108,108 @@
"replace": [
{
"start": [
1,
4,
1
],
"end": [
1,
4,
2
]
},
{
"start": [
1,
4,
1
],
"end": [
1,
4,
2
]
}
]
},
"summary": "Replaced the 'a' identifier with the 'x' identifier in the x variable"
"summary": "Replaced the 'a' identifier with the 'x' identifier in the x variable of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
1,
4,
9
],
"end": [
1,
4,
10
]
},
{
"start": [
1,
4,
9
],
"end": [
1,
4,
10
]
}
]
},
"summary": "Replaced '1' with '3' in the x variable"
"summary": "Replaced '1' with '3' in the x variable of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
1,
4,
4
],
"end": [
1,
4,
5
]
},
{
"start": [
1,
4,
4
],
"end": [
1,
4,
5
]
}
]
},
"summary": "Replaced the 'b' identifier with the 'y' identifier in the y variable"
"summary": "Replaced the 'b' identifier with the 'y' identifier in the y variable of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
1,
4,
12
],
"end": [
1,
4,
13
]
},
{
"start": [
1,
4,
12
],
"end": [
1,
4,
13
]
}
]
},
"summary": "Replaced '2' with '4' in the y variable"
"summary": "Replaced '2' with '4' in the y variable of the 'main' function"
}
]
},
@ -392,17 +220,19 @@
],
"patch": [
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
"index 96ba966..220aab8 100644",
"index 4ca1ce3..bbbf937 100644",
"--- a/short-var-declarations.go",
"+++ b/short-var-declarations.go",
"@@ -1,3 +1,3 @@",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-a, b := 1, 2",
"+x, y := 3, 4",
" a, b := 1, 2",
" a, b := 1, 2"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "ca28a3beeb3b19e152ad702d5c8ba7d4abcb87e2..601d4dd43130450c08e7e7b34bc3b35cd6df83cc"
"shas": "aade853eedaea06249909ca54b03636ca7b5b300..5d8b88fca1d2453ad1963ee85307c551473067aa"
}
,{
"testCaseDescription": "go-short-var-declarations-delete-replacement-test",
@ -411,93 +241,111 @@
"short-var-declarations.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
13
]
}
"replace": [
{
"start": [
4,
1
],
"end": [
4,
2
]
},
{
"start": [
4,
1
],
"end": [
4,
2
]
}
]
},
"summary": "Deleted the 'x' variable"
"summary": "Replaced the 'x' identifier with the 'a' identifier in the a variable of the 'main' function"
},
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
13
]
}
"replace": [
{
"start": [
4,
9
],
"end": [
4,
10
]
},
{
"start": [
4,
9
],
"end": [
4,
10
]
}
]
},
"summary": "Deleted the 'y' variable"
"summary": "Replaced '3' with '1' in the a variable of the 'main' function"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
13
]
}
"replace": [
{
"start": [
4,
4
],
"end": [
4,
5
]
},
{
"start": [
4,
4
],
"end": [
4,
5
]
}
]
},
"summary": "Deleted the 'a' variable"
"summary": "Replaced the 'y' identifier with the 'b' identifier in the b variable of the 'main' function"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
13
]
}
"replace": [
{
"start": [
4,
12
],
"end": [
4,
13
]
},
{
"start": [
4,
12
],
"end": [
4,
13
]
}
]
},
"summary": "Deleted the 'b' variable"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
13
]
}
},
"summary": "Added the 'x' variable"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
13
]
}
},
"summary": "Added the 'y' variable"
"summary": "Replaced '4' with '2' in the b variable of the 'main' function"
}
]
},
@ -508,20 +356,80 @@
],
"patch": [
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
"index 220aab8..53cb4ed 100644",
"index bbbf937..4ca1ce3 100644",
"--- a/short-var-declarations.go",
"+++ b/short-var-declarations.go",
"@@ -1,3 +1,2 @@",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-x, y := 3, 4",
"-a, b := 1, 2",
" a, b := 1, 2",
"+x, y := 3, 4"
"+a, b := 1, 2",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "601d4dd43130450c08e7e7b34bc3b35cd6df83cc..b494ce9f37460cdcc5f62dbf78571c0e1134ce60"
"shas": "5d8b88fca1d2453ad1963ee85307c551473067aa..90aac53398e5b0945c3259a22778594e8d84e730"
}
,{
"testCaseDescription": "go-short-var-declarations-delete-test",
"testCaseDescription": "go-short-var-declarations-delete-insert-test",
"expectedResult": {
"changes": {
"short-var-declarations.go": [
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
13
]
}
},
"summary": "Deleted the 'a' variable in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
13
]
}
},
"summary": "Deleted the 'b' variable in the main function of the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"short-var-declarations.go"
],
"patch": [
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
"index 4ca1ce3..7905807 100644",
"--- a/short-var-declarations.go",
"+++ b/short-var-declarations.go",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-a, b := 1, 2",
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "90aac53398e5b0945c3259a22778594e8d84e730..b499362813a66a7a5a362740fa195dbbd1876f8c"
}
,{
"testCaseDescription": "go-short-var-declarations-teardown-test",
"expectedResult": {
"changes": {
"short-var-declarations.go": [
@ -533,27 +441,12 @@
1
],
"end": [
1,
13
]
}
},
"summary": "Deleted the 'a' variable"
},
{
"span": {
"delete": {
"start": [
1,
6,
1
],
"end": [
1,
13
]
}
},
"summary": "Deleted the 'b' variable"
"summary": "Deleted the 'main' module"
}
]
},
@ -564,66 +457,16 @@
],
"patch": [
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
"index 53cb4ed..9209ec7 100644",
"index 7905807..e69de29 100644",
"--- a/short-var-declarations.go",
"+++ b/short-var-declarations.go",
"@@ -1,2 +1 @@",
"-a, b := 1, 2",
" x, y := 3, 4"
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "b494ce9f37460cdcc5f62dbf78571c0e1134ce60..6943eb4765b07143acf4bead143f4e9927d67e74"
}
,{
"testCaseDescription": "go-short-var-declarations-delete-rest-test",
"expectedResult": {
"changes": {
"short-var-declarations.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
13
]
}
},
"summary": "Deleted the 'x' variable"
},
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
13
]
}
},
"summary": "Deleted the 'y' variable"
}
]
},
"errors": {}
},
"filePaths": [
"short-var-declarations.go"
],
"patch": [
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
"index 9209ec7..e69de29 100644",
"--- a/short-var-declarations.go",
"+++ b/short-var-declarations.go",
"@@ -1 +0,0 @@",
"-x, y := 3, 4"
],
"gitDir": "test/corpus/repos/go",
"shas": "6943eb4765b07143acf4bead143f4e9927d67e74..b47f159a4e69c481019748b1b4451ca5480b48ac"
"shas": "b499362813a66a7a5a362740fa195dbbd1876f8c..85cf38beee139dd151b7dd8f50060f85e916fd8d"
}]

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
[{
"testCaseDescription": "go-slice-literals-insert-test",
"testCaseDescription": "go-slice-literals-setup-test",
"expectedResult": {
"changes": {
"slice-literals.go": [
@ -10,43 +10,13 @@
1,
1
],
"end": [
1,
22
]
}
},
"summary": "Added the 's1' variable"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
26
]
}
},
"summary": "Added the 's2' variable"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
6,
2
1
]
}
},
"summary": "Added the 's3' variable"
"summary": "Added the 'main' module"
}
]
},
@ -57,117 +27,23 @@
],
"patch": [
"diff --git a/slice-literals.go b/slice-literals.go",
"index e69de29..9b1eb7a 100644",
"index e69de29..7905807 100644",
"--- a/slice-literals.go",
"+++ b/slice-literals.go",
"@@ -0,0 +1,6 @@",
"+const s1 = []string{}",
"+const s2 = []string{\"hi\"}",
"+const s3 = []string{",
"+\"hi\",",
"+ \"hello\",",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "d7c85b9aedcbd3af69fdfe6a30e249364113d5e2..e5b39d883ee5c4845c6e84d7c6edec4ba14c5057"
"shas": "34ccf43e44945249f16f0e99225d6cea00213df7..a55df69e9e0f42b49f27c79c33c59781a81591bc"
}
,{
"testCaseDescription": "go-slice-literals-replacement-insert-test",
"testCaseDescription": "go-slice-literals-insert-test",
"expectedResult": {
"changes": {
"slice-literals.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
27
]
}
},
"summary": "Added the 's1' variable"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
29
]
}
},
"summary": "Added the 's2' variable"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
6,
2
]
}
},
"summary": "Added the 's3' variable"
},
{
"span": {
"insert": {
"start": [
7,
1
],
"end": [
7,
22
]
}
},
"summary": "Added the 's1' variable"
},
{
"span": {
"insert": {
"start": [
8,
1
],
"end": [
8,
26
]
}
},
"summary": "Added the 's2' variable"
},
{
"span": {
"insert": {
"start": [
9,
1
],
"end": [
12,
2
]
}
},
"summary": "Added the 's3' variable"
}
]
},
"changes": {},
"errors": {}
},
"filePaths": [
@ -175,286 +51,29 @@
],
"patch": [
"diff --git a/slice-literals.go b/slice-literals.go",
"index 9b1eb7a..4555163 100644",
"index 7905807..3c94936 100644",
"--- a/slice-literals.go",
"+++ b/slice-literals.go",
"@@ -1,3 +1,15 @@",
"+const s1 = []string{\"sup\"}",
"+const s2 = []string{\"hello\"}",
"+const s3 = []string{",
"+\"bar\",",
"+ \"baz\",",
"+}",
"@@ -1,5 +1,10 @@",
" package main",
" ",
" func main() {",
"-",
"+const s1 = []string{}",
"+const s2 = []string{\"hi\"}",
"+const s3 = []string{",
"+\"hi\",",
"+ \"hello\",",
"+}",
" const s1 = []string{}",
" const s2 = []string{\"hi\"}",
" const s3 = []string{"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "e5b39d883ee5c4845c6e84d7c6edec4ba14c5057..e92c35c4e9312dc3a6e804deda19c55347de6e06"
}
,{
"testCaseDescription": "go-slice-literals-delete-insert-test",
"expectedResult": {
"changes": {
"slice-literals.go": [
{
"span": {
"replace": [
{
"start": [
1,
21
],
"end": [
1,
26
]
},
{
"start": [
1,
20
],
"end": [
1,
22
]
}
]
},
"summary": "Replaced the \"sup\" string with the '{}' literal_value in the s1 variable"
},
{
"span": {
"replace": [
{
"start": [
2,
21
],
"end": [
2,
28
]
},
{
"start": [
2,
21
],
"end": [
2,
25
]
}
]
},
"summary": "Replaced the \"hello\" string with the \"hi\" string in the s2 variable"
},
{
"span": {
"replace": [
{
"start": [
4,
1
],
"end": [
4,
6
]
},
{
"start": [
4,
1
],
"end": [
4,
5
]
}
]
},
"summary": "Replaced the \"bar\" string with the \"hi\" string in the s3 variable"
},
{
"span": {
"replace": [
{
"start": [
5,
2
],
"end": [
5,
7
]
},
{
"start": [
5,
2
],
"end": [
5,
9
]
}
]
},
"summary": "Replaced the \"baz\" string with the \"hello\" string in the s3 variable"
}
]
},
"errors": {}
},
"filePaths": [
"slice-literals.go"
],
"patch": [
"diff --git a/slice-literals.go b/slice-literals.go",
"index 4555163..39a2067 100644",
"--- a/slice-literals.go",
"+++ b/slice-literals.go",
"@@ -1,8 +1,8 @@",
"-const s1 = []string{\"sup\"}",
"-const s2 = []string{\"hello\"}",
"+const s1 = []string{}",
"+const s2 = []string{\"hi\"}",
" const s3 = []string{",
"-\"bar\",",
"- \"baz\",",
"+\"hi\",",
"+ \"hello\",",
" }",
" const s1 = []string{}",
" const s2 = []string{\"hi\"}"
],
"gitDir": "test/corpus/repos/go",
"shas": "e92c35c4e9312dc3a6e804deda19c55347de6e06..4d6e51e7ba29099b0b91915fb889af994eec1795"
"shas": "a55df69e9e0f42b49f27c79c33c59781a81591bc..4f76404faacda954f72d23606bcea2a90551927f"
}
,{
"testCaseDescription": "go-slice-literals-replacement-test",
"expectedResult": {
"changes": {
"slice-literals.go": [
{
"span": {
"replace": [
{
"start": [
1,
20
],
"end": [
1,
22
]
},
{
"start": [
1,
21
],
"end": [
1,
26
]
}
]
},
"summary": "Replaced the '{}' literal_value with the \"sup\" string in the s1 variable"
},
{
"span": {
"replace": [
{
"start": [
2,
21
],
"end": [
2,
25
]
},
{
"start": [
2,
21
],
"end": [
2,
28
]
}
]
},
"summary": "Replaced the \"hi\" string with the \"hello\" string in the s2 variable"
},
{
"span": {
"replace": [
{
"start": [
4,
1
],
"end": [
4,
5
]
},
{
"start": [
4,
1
],
"end": [
4,
6
]
}
]
},
"summary": "Replaced the \"hi\" string with the \"bar\" string in the s3 variable"
},
{
"span": {
"replace": [
{
"start": [
5,
2
],
"end": [
5,
9
]
},
{
"start": [
5,
2
],
"end": [
5,
7
]
}
]
},
"summary": "Replaced the \"hello\" string with the \"baz\" string in the s3 variable"
}
]
},
"changes": {},
"errors": {}
},
"filePaths": [
@ -462,10 +81,13 @@
],
"patch": [
"diff --git a/slice-literals.go b/slice-literals.go",
"index 39a2067..4555163 100644",
"index 3c94936..caefc00 100644",
"--- a/slice-literals.go",
"+++ b/slice-literals.go",
"@@ -1,8 +1,8 @@",
"@@ -1,10 +1,10 @@",
" package main",
" ",
" func main() {",
"-const s1 = []string{}",
"-const s2 = []string{\"hi\"}",
"+const s1 = []string{\"sup\"}",
@ -476,154 +98,15 @@
"+\"bar\",",
"+ \"baz\",",
" }",
" const s1 = []string{}",
" const s2 = []string{\"hi\"}"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "4d6e51e7ba29099b0b91915fb889af994eec1795..079faf0b3b47fde58866875a9a64813bc764950c"
"shas": "4f76404faacda954f72d23606bcea2a90551927f..5e3c2cf805ebc6b82d817a6303d490693f7b2ce8"
}
,{
"testCaseDescription": "go-slice-literals-delete-replacement-test",
"expectedResult": {
"changes": {
"slice-literals.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
27
]
}
},
"summary": "Deleted the 's1' variable"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
29
]
}
},
"summary": "Deleted the 's2' variable"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
6,
2
]
}
},
"summary": "Deleted the 's3' variable"
},
{
"span": {
"delete": {
"start": [
7,
1
],
"end": [
7,
22
]
}
},
"summary": "Deleted the 's1' variable"
},
{
"span": {
"delete": {
"start": [
8,
1
],
"end": [
8,
26
]
}
},
"summary": "Deleted the 's2' variable"
},
{
"span": {
"delete": {
"start": [
9,
1
],
"end": [
12,
2
]
}
},
"summary": "Deleted the 's3' variable"
},
{
"span": {
"insert": {
"start": [
7,
1
],
"end": [
7,
27
]
}
},
"summary": "Added the 's1' variable"
},
{
"span": {
"insert": {
"start": [
8,
1
],
"end": [
8,
29
]
}
},
"summary": "Added the 's2' variable"
},
{
"span": {
"insert": {
"start": [
9,
1
],
"end": [
12,
2
]
}
},
"summary": "Added the 's3' variable"
}
]
},
"changes": {},
"errors": {}
},
"filePaths": [
@ -631,88 +114,32 @@
],
"patch": [
"diff --git a/slice-literals.go b/slice-literals.go",
"index 4555163..d3fb29c 100644",
"index caefc00..3c94936 100644",
"--- a/slice-literals.go",
"+++ b/slice-literals.go",
"@@ -1,18 +1,12 @@",
"@@ -1,10 +1,10 @@",
" package main",
" ",
" func main() {",
"-const s1 = []string{\"sup\"}",
"-const s2 = []string{\"hello\"}",
"-const s3 = []string{",
"+const s1 = []string{}",
"+const s2 = []string{\"hi\"}",
" const s3 = []string{",
"-\"bar\",",
"- \"baz\",",
"-}",
" const s1 = []string{}",
" const s2 = []string{\"hi\"}",
" const s3 = []string{",
" \"hi\",",
" \"hello\",",
"+\"hi\",",
"+ \"hello\",",
" }",
"-const s1 = []string{}",
"-const s2 = []string{\"hi\"}",
"+const s1 = []string{\"sup\"}",
"+const s2 = []string{\"hello\"}",
" const s3 = []string{",
"-\"hi\",",
"- \"hello\",",
"+\"bar\",",
"+ \"baz\",",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "079faf0b3b47fde58866875a9a64813bc764950c..705764c3224fe96e65bbb4e3ff1e8388e7219783"
"shas": "5e3c2cf805ebc6b82d817a6303d490693f7b2ce8..3c7e8fd0d2fad098fa35397187981f032e1a74ff"
}
,{
"testCaseDescription": "go-slice-literals-delete-test",
"testCaseDescription": "go-slice-literals-delete-insert-test",
"expectedResult": {
"changes": {
"slice-literals.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
22
]
}
},
"summary": "Deleted the 's1' variable"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
26
]
}
},
"summary": "Deleted the 's2' variable"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
6,
2
]
}
},
"summary": "Deleted the 's3' variable"
}
]
},
"changes": {},
"errors": {}
},
"filePaths": [
@ -720,25 +147,27 @@
],
"patch": [
"diff --git a/slice-literals.go b/slice-literals.go",
"index d3fb29c..e3fd378 100644",
"index 3c94936..7905807 100644",
"--- a/slice-literals.go",
"+++ b/slice-literals.go",
"@@ -1,9 +1,3 @@",
"@@ -1,10 +1,5 @@",
" package main",
" ",
" func main() {",
"-const s1 = []string{}",
"-const s2 = []string{\"hi\"}",
"-const s3 = []string{",
"-\"hi\",",
"- \"hello\",",
"-}",
" const s1 = []string{\"sup\"}",
" const s2 = []string{\"hello\"}",
" const s3 = []string{"
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "705764c3224fe96e65bbb4e3ff1e8388e7219783..70be820be1a032a886aba1efaf386ea20e7e4636"
"shas": "3c7e8fd0d2fad098fa35397187981f032e1a74ff..f1878f357238ec015c732dceb6b099ea18c90e98"
}
,{
"testCaseDescription": "go-slice-literals-delete-rest-test",
"testCaseDescription": "go-slice-literals-teardown-test",
"expectedResult": {
"changes": {
"slice-literals.go": [
@ -749,43 +178,13 @@
1,
1
],
"end": [
1,
27
]
}
},
"summary": "Deleted the 's1' variable"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
29
]
}
},
"summary": "Deleted the 's2' variable"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
6,
2
1
]
}
},
"summary": "Deleted the 's3' variable"
"summary": "Deleted the 'main' module"
}
]
},
@ -796,17 +195,16 @@
],
"patch": [
"diff --git a/slice-literals.go b/slice-literals.go",
"index e3fd378..e69de29 100644",
"index 7905807..e69de29 100644",
"--- a/slice-literals.go",
"+++ b/slice-literals.go",
"@@ -1,6 +0,0 @@",
"-const s1 = []string{\"sup\"}",
"-const s2 = []string{\"hello\"}",
"-const s3 = []string{",
"-\"bar\",",
"- \"baz\",",
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "70be820be1a032a886aba1efaf386ea20e7e4636..0fff314fad0973ea89120a1ae3b7940e0f7866d2"
"shas": "f1878f357238ec015c732dceb6b099ea18c90e98..388f63ca683f5d2b478586fd640d5ca33433dc98"
}]

View File

@ -1,4 +1,46 @@
[{
"testCaseDescription": "go-slice-types-setup-test",
"expectedResult": {
"changes": {
"slice-types.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"slice-types.go"
],
"patch": [
"diff --git a/slice-types.go b/slice-types.go",
"index e69de29..7905807 100644",
"--- a/slice-types.go",
"+++ b/slice-types.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "b2613e72526211d331fe3ee187e2503ae23f1b36..3a5b93f85625eb9778bc4537eb3b63a46912998b"
}
,{
"testCaseDescription": "go-slice-types-insert-test",
"expectedResult": {
"changes": {
@ -7,61 +49,61 @@
"span": {
"insert": {
"start": [
1,
4,
6
],
"end": [
1,
4,
7
]
}
},
"summary": "Added the 'a' identifier"
"summary": "Added the 'a' identifier in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
1,
4,
10
],
"end": [
1,
4,
11
]
}
},
"summary": "Added the 'b' identifier"
"summary": "Added the 'b' identifier in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
2,
5,
6
],
"end": [
2,
5,
7
]
}
},
"summary": "Added the 'c' identifier"
"summary": "Added the 'c' identifier in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
2,
5,
12
],
"end": [
2,
5,
13
]
}
},
"summary": "Added the 'd' identifier"
"summary": "Added the 'd' identifier in the main function of the 'main' module"
}
]
},
@ -72,252 +114,20 @@
],
"patch": [
"diff --git a/slice-types.go b/slice-types.go",
"index e69de29..1b8dbe5 100644",
"index 7905807..4880791 100644",
"--- a/slice-types.go",
"+++ b/slice-types.go",
"@@ -0,0 +1,2 @@",
"+type a []b",
"+type c [][]d"
],
"gitDir": "test/corpus/repos/go",
"shas": "ecbb5b13e89407c4e715ccf67e358e5fc18fbfe6..bb07f330c30f729c34488c5177bdbfa1adcda009"
}
,{
"testCaseDescription": "go-slice-types-replacement-insert-test",
"expectedResult": {
"changes": {
"slice-types.go": [
{
"span": {
"insert": {
"start": [
1,
6
],
"end": [
1,
7
]
}
},
"summary": "Added the 'a' identifier"
},
{
"span": {
"insert": {
"start": [
1,
12
],
"end": [
1,
13
]
}
},
"summary": "Added the 'p' identifier"
},
{
"span": {
"insert": {
"start": [
2,
6
],
"end": [
2,
7
]
}
},
"summary": "Added the 'c' identifier"
},
{
"span": {
"insert": {
"start": [
2,
10
],
"end": [
2,
11
]
}
},
"summary": "Added the 'y' identifier"
},
{
"span": {
"insert": {
"start": [
3,
6
],
"end": [
3,
7
]
}
},
"summary": "Added the 'a' identifier"
},
{
"span": {
"insert": {
"start": [
3,
10
],
"end": [
3,
11
]
}
},
"summary": "Added the 'b' identifier"
},
{
"span": {
"insert": {
"start": [
4,
6
],
"end": [
4,
7
]
}
},
"summary": "Added the 'c' identifier"
},
{
"span": {
"insert": {
"start": [
4,
12
],
"end": [
4,
13
]
}
},
"summary": "Added the 'd' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"slice-types.go"
],
"patch": [
"diff --git a/slice-types.go b/slice-types.go",
"index 1b8dbe5..d718ee8 100644",
"--- a/slice-types.go",
"+++ b/slice-types.go",
"@@ -1,2 +1,6 @@",
"+type a [][]p",
"+type c []y",
"@@ -1,5 +1,6 @@",
" package main",
" ",
" func main() {",
"-",
"+type a []b",
"+type c [][]d",
" type a []b",
" type c [][]d"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "bb07f330c30f729c34488c5177bdbfa1adcda009..d8a446f73da85de672759677f695a3604809776c"
}
,{
"testCaseDescription": "go-slice-types-delete-insert-test",
"expectedResult": {
"changes": {
"slice-types.go": [
{
"span": {
"insert": {
"start": [
1,
10
],
"end": [
1,
11
]
}
},
"summary": "Added the 'b' identifier"
},
{
"span": {
"delete": {
"start": [
1,
12
],
"end": [
1,
13
]
}
},
"summary": "Deleted the 'p' identifier"
},
{
"span": {
"insert": {
"start": [
2,
12
],
"end": [
2,
13
]
}
},
"summary": "Added the 'd' identifier"
},
{
"span": {
"delete": {
"start": [
2,
10
],
"end": [
2,
11
]
}
},
"summary": "Deleted the 'y' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"slice-types.go"
],
"patch": [
"diff --git a/slice-types.go b/slice-types.go",
"index d718ee8..e6836eb 100644",
"--- a/slice-types.go",
"+++ b/slice-types.go",
"@@ -1,5 +1,5 @@",
"-type a [][]p",
"-type c []y",
"+type a []b",
"+type c [][]d",
" type a []b",
" type c [][]d",
" type a []b"
],
"gitDir": "test/corpus/repos/go",
"shas": "d8a446f73da85de672759677f695a3604809776c..10f227c053ced89f4057aa2b666319e8385c4ef1"
"shas": "3a5b93f85625eb9778bc4537eb3b63a46912998b..953664bbcd46e2f61c0d662a4e1de2d650a95793"
}
,{
"testCaseDescription": "go-slice-types-replacement-test",
@ -328,61 +138,61 @@
"span": {
"insert": {
"start": [
1,
4,
12
],
"end": [
1,
4,
13
]
}
},
"summary": "Added the 'p' identifier"
"summary": "Added the 'p' identifier in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
1,
4,
10
],
"end": [
1,
4,
11
]
}
},
"summary": "Deleted the 'b' identifier"
"summary": "Deleted the 'b' identifier in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
2,
5,
10
],
"end": [
2,
5,
11
]
}
},
"summary": "Added the 'y' identifier"
"summary": "Added the 'y' identifier in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
2,
5,
12
],
"end": [
2,
5,
13
]
}
},
"summary": "Deleted the 'd' identifier"
"summary": "Deleted the 'd' identifier in the main function of the 'main' module"
}
]
},
@ -393,20 +203,21 @@
],
"patch": [
"diff --git a/slice-types.go b/slice-types.go",
"index e6836eb..d718ee8 100644",
"index 4880791..b48b280 100644",
"--- a/slice-types.go",
"+++ b/slice-types.go",
"@@ -1,5 +1,5 @@",
"@@ -1,6 +1,6 @@",
" package main",
" ",
" func main() {",
"-type a []b",
"-type c [][]d",
"+type a [][]p",
"+type c []y",
" type a []b",
" type c [][]d",
" type a []b"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "10f227c053ced89f4057aa2b666319e8385c4ef1..6a94a9051822b4344c1e02e1a4924d670f872acb"
"shas": "953664bbcd46e2f61c0d662a4e1de2d650a95793..a9d92d1b0bb0839a932d3ad1959d1030053f2f86"
}
,{
"testCaseDescription": "go-slice-types-delete-replacement-test",
@ -415,108 +226,18 @@
"slice-types.go": [
{
"span": {
"delete": {
"insert": {
"start": [
1,
6
],
"end": [
1,
7
]
}
},
"summary": "Deleted the 'a' identifier"
},
{
"span": {
"delete": {
"start": [
1,
12
],
"end": [
1,
13
]
}
},
"summary": "Deleted the 'p' identifier"
},
{
"span": {
"delete": {
"start": [
2,
6
],
"end": [
2,
7
]
}
},
"summary": "Deleted the 'c' identifier"
},
{
"span": {
"delete": {
"start": [
2,
4,
10
],
"end": [
2,
4,
11
]
}
},
"summary": "Deleted the 'y' identifier"
},
{
"span": {
"delete": {
"start": [
3,
6
],
"end": [
3,
7
]
}
},
"summary": "Deleted the 'a' identifier"
},
{
"span": {
"delete": {
"start": [
3,
10
],
"end": [
3,
11
]
}
},
"summary": "Deleted the 'b' identifier"
},
{
"span": {
"delete": {
"start": [
4,
6
],
"end": [
4,
7
]
}
},
"summary": "Deleted the 'c' identifier"
"summary": "Added the 'b' identifier in the main function of the 'main' module"
},
{
"span": {
@ -531,67 +252,37 @@
]
}
},
"summary": "Deleted the 'd' identifier"
"summary": "Deleted the 'p' identifier in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
3,
6
],
"end": [
3,
7
]
}
},
"summary": "Added the 'a' identifier"
},
{
"span": {
"insert": {
"start": [
3,
5,
12
],
"end": [
3,
5,
13
]
}
},
"summary": "Added the 'p' identifier"
"summary": "Added the 'd' identifier in the main function of the 'main' module"
},
{
"span": {
"insert": {
"delete": {
"start": [
4,
6
],
"end": [
4,
7
]
}
},
"summary": "Added the 'c' identifier"
},
{
"span": {
"insert": {
"start": [
4,
5,
10
],
"end": [
4,
5,
11
]
}
},
"summary": "Added the 'y' identifier"
"summary": "Deleted the 'y' identifier in the main function of the 'main' module"
}
]
},
@ -602,24 +293,24 @@
],
"patch": [
"diff --git a/slice-types.go b/slice-types.go",
"index d718ee8..9f9c73f 100644",
"index b48b280..4880791 100644",
"--- a/slice-types.go",
"+++ b/slice-types.go",
"@@ -1,6 +1,4 @@",
"@@ -1,6 +1,6 @@",
" package main",
" ",
" func main() {",
"-type a [][]p",
"-type c []y",
"-type a []b",
"-type c [][]d",
" type a []b",
" type c [][]d",
"+type a [][]p",
"+type c []y"
"+type a []b",
"+type c [][]d",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "6a94a9051822b4344c1e02e1a4924d670f872acb..86ed7e6c1594c7c244da53bda19ab35fbe1a4431"
"shas": "a9d92d1b0bb0839a932d3ad1959d1030053f2f86..ae96e9d20a5a103d438434d25208a02d604ce28b"
}
,{
"testCaseDescription": "go-slice-types-delete-test",
"testCaseDescription": "go-slice-types-delete-insert-test",
"expectedResult": {
"changes": {
"slice-types.go": [
@ -627,61 +318,61 @@
"span": {
"delete": {
"start": [
1,
4,
6
],
"end": [
1,
4,
7
]
}
},
"summary": "Deleted the 'a' identifier"
"summary": "Deleted the 'a' identifier in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
1,
4,
10
],
"end": [
1,
4,
11
]
}
},
"summary": "Deleted the 'b' identifier"
"summary": "Deleted the 'b' identifier in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
2,
5,
6
],
"end": [
2,
5,
7
]
}
},
"summary": "Deleted the 'c' identifier"
"summary": "Deleted the 'c' identifier in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
2,
5,
12
],
"end": [
2,
5,
13
]
}
},
"summary": "Deleted the 'd' identifier"
"summary": "Deleted the 'd' identifier in the main function of the 'main' module"
}
]
},
@ -692,20 +383,23 @@
],
"patch": [
"diff --git a/slice-types.go b/slice-types.go",
"index 9f9c73f..964a319 100644",
"index 4880791..7905807 100644",
"--- a/slice-types.go",
"+++ b/slice-types.go",
"@@ -1,4 +1,2 @@",
"@@ -1,6 +1,5 @@",
" package main",
" ",
" func main() {",
"-type a []b",
"-type c [][]d",
" type a [][]p",
" type c []y"
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "86ed7e6c1594c7c244da53bda19ab35fbe1a4431..86be4da43ace61e52cc61914cc60bed850f3c0cc"
"shas": "ae96e9d20a5a103d438434d25208a02d604ce28b..69e058e2c2364f15e790d08eb07be05d6be46fe8"
}
,{
"testCaseDescription": "go-slice-types-delete-rest-test",
"testCaseDescription": "go-slice-types-teardown-test",
"expectedResult": {
"changes": {
"slice-types.go": [
@ -714,60 +408,15 @@
"delete": {
"start": [
1,
6
1
],
"end": [
1,
7
6,
1
]
}
},
"summary": "Deleted the 'a' identifier"
},
{
"span": {
"delete": {
"start": [
1,
12
],
"end": [
1,
13
]
}
},
"summary": "Deleted the 'p' identifier"
},
{
"span": {
"delete": {
"start": [
2,
6
],
"end": [
2,
7
]
}
},
"summary": "Deleted the 'c' identifier"
},
{
"span": {
"delete": {
"start": [
2,
10
],
"end": [
2,
11
]
}
},
"summary": "Deleted the 'y' identifier"
"summary": "Deleted the 'main' module"
}
]
},
@ -778,13 +427,16 @@
],
"patch": [
"diff --git a/slice-types.go b/slice-types.go",
"index 964a319..e69de29 100644",
"index 7905807..e69de29 100644",
"--- a/slice-types.go",
"+++ b/slice-types.go",
"@@ -1,2 +0,0 @@",
"-type a [][]p",
"-type c []y"
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "86be4da43ace61e52cc61914cc60bed850f3c0cc..1e96ae060f06444539a3cfa853d7de2f58dd8eac"
"shas": "69e058e2c2364f15e790d08eb07be05d6be46fe8..e4fc32427c5fa178c66db66a2cce3dab5bf19a04"
}]

View File

@ -1,40 +1,49 @@
[{
"testCaseDescription": "go-string-literals-setup-test",
"expectedResult": {
"changes": {
"string-literals.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"string-literals.go"
],
"patch": [
"diff --git a/string-literals.go b/string-literals.go",
"index e69de29..7905807 100644",
"--- a/string-literals.go",
"+++ b/string-literals.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "7313c98bc1dadd02edefed0e5dac5b0a8d79ae27..217252e5d50d5f8ea963a59d6921f21d8354eabd"
}
,{
"testCaseDescription": "go-string-literals-insert-test",
"expectedResult": {
"changes": {
"string-literals.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
4,
2
]
}
},
"summary": "Added the 'a' variable"
},
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
4,
2
]
}
},
"summary": "Added the 'b' variable"
}
]
},
"changes": {},
"errors": {}
},
"filePaths": [
@ -42,257 +51,27 @@
],
"patch": [
"diff --git a/string-literals.go b/string-literals.go",
"index e69de29..90ac543 100644",
"index 7905807..9a69966 100644",
"--- a/string-literals.go",
"+++ b/string-literals.go",
"@@ -0,0 +1,4 @@",
"+const (",
"+a = \"0\"",
"+b = \"hello world\"",
"+)"
],
"gitDir": "test/corpus/repos/go",
"shas": "740c6c6b1390c86d2f179d9d31f010916292861a..9698847d1ada590968dad5fc427c1758590173f2"
}
,{
"testCaseDescription": "go-string-literals-replacement-insert-test",
"expectedResult": {
"changes": {
"string-literals.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
4,
2
]
}
},
"summary": "Added the 'a' variable"
},
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
4,
2
]
}
},
"summary": "Added the 'b' variable"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
8,
2
]
}
},
"summary": "Added the 'a' variable"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
8,
2
]
}
},
"summary": "Added the 'b' variable"
}
]
},
"errors": {}
},
"filePaths": [
"string-literals.go"
],
"patch": [
"diff --git a/string-literals.go b/string-literals.go",
"index 90ac543..a781ce7 100644",
"--- a/string-literals.go",
"+++ b/string-literals.go",
"@@ -1,4 +1,12 @@",
" const (",
"+a = \"2\"",
"+b = \"hi\"",
"+)",
"@@ -1,5 +1,8 @@",
" package main",
" ",
" func main() {",
"-",
"+const (",
"+a = \"0\"",
"+b = \"hello world\"",
"+)",
"+const (",
" a = \"0\"",
" b = \"hello world\"",
" )"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "9698847d1ada590968dad5fc427c1758590173f2..e8867a66d6757f4af01fd07689f3c8a879acdc80"
}
,{
"testCaseDescription": "go-string-literals-delete-insert-test",
"expectedResult": {
"changes": {
"string-literals.go": [
{
"span": {
"replace": [
{
"start": [
2,
5
],
"end": [
2,
8
]
},
{
"start": [
2,
5
],
"end": [
2,
8
]
}
]
},
"summary": "Replaced the \"2\" string with the \"0\" string in the a variable"
},
{
"span": {
"replace": [
{
"start": [
3,
5
],
"end": [
3,
9
]
},
{
"start": [
3,
5
],
"end": [
3,
18
]
}
]
},
"summary": "Replaced the \"hi\" string with the \"hello world\" string in the b variable"
}
]
},
"errors": {}
},
"filePaths": [
"string-literals.go"
],
"patch": [
"diff --git a/string-literals.go b/string-literals.go",
"index a781ce7..e7b83ba 100644",
"--- a/string-literals.go",
"+++ b/string-literals.go",
"@@ -1,6 +1,6 @@",
" const (",
"-a = \"2\"",
"-b = \"hi\"",
"+a = \"0\"",
"+b = \"hello world\"",
" )",
" const (",
" a = \"0\""
],
"gitDir": "test/corpus/repos/go",
"shas": "e8867a66d6757f4af01fd07689f3c8a879acdc80..afb562067673bb91dc8df3e801ccb22827b8061e"
"shas": "217252e5d50d5f8ea963a59d6921f21d8354eabd..b88c5f59726b5d8aaa473e9aab7b4cafe821e264"
}
,{
"testCaseDescription": "go-string-literals-replacement-test",
"expectedResult": {
"changes": {
"string-literals.go": [
{
"span": {
"replace": [
{
"start": [
2,
5
],
"end": [
2,
8
]
},
{
"start": [
2,
5
],
"end": [
2,
8
]
}
]
},
"summary": "Replaced the \"0\" string with the \"2\" string in the a variable"
},
{
"span": {
"replace": [
{
"start": [
3,
5
],
"end": [
3,
18
]
},
{
"start": [
3,
5
],
"end": [
3,
9
]
}
]
},
"summary": "Replaced the \"hello world\" string with the \"hi\" string in the b variable"
}
]
},
"changes": {},
"errors": {}
},
"filePaths": [
@ -300,119 +79,27 @@
],
"patch": [
"diff --git a/string-literals.go b/string-literals.go",
"index e7b83ba..a781ce7 100644",
"index 9a69966..fbbdb93 100644",
"--- a/string-literals.go",
"+++ b/string-literals.go",
"@@ -1,6 +1,6 @@",
"@@ -2,7 +2,7 @@ package main",
" ",
" func main() {",
" const (",
"-a = \"0\"",
"-b = \"hello world\"",
"+a = \"2\"",
"+b = \"hi\"",
" )",
" const (",
" a = \"0\""
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "afb562067673bb91dc8df3e801ccb22827b8061e..5345aa6a6eba226eb0cc8bce11c1073b3afea305"
"shas": "b88c5f59726b5d8aaa473e9aab7b4cafe821e264..e961cdb966e795008b52148f8199dafffcdd3d15"
}
,{
"testCaseDescription": "go-string-literals-delete-replacement-test",
"expectedResult": {
"changes": {
"string-literals.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
4,
2
]
}
},
"summary": "Deleted the 'a' variable"
},
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
4,
2
]
}
},
"summary": "Deleted the 'b' variable"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
8,
2
]
}
},
"summary": "Deleted the 'a' variable"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
8,
2
]
}
},
"summary": "Deleted the 'b' variable"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
8,
2
]
}
},
"summary": "Added the 'a' variable"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
8,
2
]
}
},
"summary": "Added the 'b' variable"
}
]
},
"changes": {},
"errors": {}
},
"filePaths": [
@ -420,65 +107,27 @@
],
"patch": [
"diff --git a/string-literals.go b/string-literals.go",
"index a781ce7..38c651f 100644",
"index fbbdb93..9a69966 100644",
"--- a/string-literals.go",
"+++ b/string-literals.go",
"@@ -1,12 +1,8 @@",
"@@ -2,7 +2,7 @@ package main",
" ",
" func main() {",
" const (",
"-a = \"2\"",
"-b = \"hi\"",
"-)",
"-const (",
" a = \"0\"",
" b = \"hello world\"",
"+a = \"0\"",
"+b = \"hello world\"",
" )",
" const (",
"-a = \"0\"",
"-b = \"hello world\"",
"+a = \"2\"",
"+b = \"hi\"",
" )"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "5345aa6a6eba226eb0cc8bce11c1073b3afea305..38c2ea7acc57af4f85190210c284999e77853ab5"
"shas": "e961cdb966e795008b52148f8199dafffcdd3d15..78cf53ac0bcb364ce7640123057d0ac1a7c01d90"
}
,{
"testCaseDescription": "go-string-literals-delete-test",
"testCaseDescription": "go-string-literals-delete-insert-test",
"expectedResult": {
"changes": {
"string-literals.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
4,
2
]
}
},
"summary": "Deleted the 'a' variable"
},
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
4,
2
]
}
},
"summary": "Deleted the 'b' variable"
}
]
},
"changes": {},
"errors": {}
},
"filePaths": [
@ -486,24 +135,25 @@
],
"patch": [
"diff --git a/string-literals.go b/string-literals.go",
"index 38c651f..f70bc80 100644",
"index 9a69966..7905807 100644",
"--- a/string-literals.go",
"+++ b/string-literals.go",
"@@ -1,8 +1,4 @@",
" const (",
"@@ -1,8 +1,5 @@",
" package main",
" ",
" func main() {",
"-const (",
"-a = \"0\"",
"-b = \"hello world\"",
"-)",
"-const (",
" a = \"2\"",
" b = \"hi\"",
" )"
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "38c2ea7acc57af4f85190210c284999e77853ab5..4fb5f349e5afea8321390fc01cd64c5e894a987c"
"shas": "78cf53ac0bcb364ce7640123057d0ac1a7c01d90..4b6d4aef29dba70649dd25f6f537f1364c853464"
}
,{
"testCaseDescription": "go-string-literals-delete-rest-test",
"testCaseDescription": "go-string-literals-teardown-test",
"expectedResult": {
"changes": {
"string-literals.go": [
@ -515,27 +165,12 @@
1
],
"end": [
4,
2
]
}
},
"summary": "Deleted the 'a' variable"
},
{
"span": {
"delete": {
"start": [
1,
6,
1
],
"end": [
4,
2
]
}
},
"summary": "Deleted the 'b' variable"
"summary": "Deleted the 'main' module"
}
]
},
@ -546,15 +181,16 @@
],
"patch": [
"diff --git a/string-literals.go b/string-literals.go",
"index f70bc80..e69de29 100644",
"index 7905807..e69de29 100644",
"--- a/string-literals.go",
"+++ b/string-literals.go",
"@@ -1,4 +0,0 @@",
"-const (",
"-a = \"2\"",
"-b = \"hi\"",
"-)"
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "4fb5f349e5afea8321390fc01cd64c5e894a987c..d7c85b9aedcbd3af69fdfe6a30e249364113d5e2"
"shas": "4b6d4aef29dba70649dd25f6f537f1364c853464..34ccf43e44945249f16f0e99225d6cea00213df7"
}]

View File

@ -1,55 +1,49 @@
[{
"testCaseDescription": "go-struct-literals-setup-test",
"expectedResult": {
"changes": {
"struct-literals.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"struct-literals.go"
],
"patch": [
"diff --git a/struct-literals.go b/struct-literals.go",
"index e69de29..7905807 100644",
"--- a/struct-literals.go",
"+++ b/struct-literals.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "b92b7fa71587a369b3db2ed6695f7537c36a4729..b7aa559dab86c329ab14bbb2eafe55e9441616c9"
}
,{
"testCaseDescription": "go-struct-literals-insert-test",
"expectedResult": {
"changes": {
"struct-literals.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
4,
2
]
}
},
"summary": "Added the 's1' variable"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
5,
32
]
}
},
"summary": "Added the 's2' variable"
},
{
"span": {
"insert": {
"start": [
6,
1
],
"end": [
6,
23
]
}
},
"summary": "Added the 's3' variable"
}
]
},
"changes": {},
"errors": {}
},
"filePaths": [
@ -57,458 +51,29 @@
],
"patch": [
"diff --git a/struct-literals.go b/struct-literals.go",
"index e69de29..f949dbb 100644",
"index 7905807..e6fd4f1 100644",
"--- a/struct-literals.go",
"+++ b/struct-literals.go",
"@@ -0,0 +1,6 @@",
"+const s1 = Person{",
"+name: \"Frank\",",
"+Age: \"5 months\",",
"+}",
"+const s2 = struct{i int;}{i: 5}",
"+const s3 = time.Time{}"
],
"gitDir": "test/corpus/repos/go",
"shas": "821d52811675ea17dd00d79b0f4e082376b97afc..f95070fc9ad568a31f1f26f714fca1b38e518d0f"
}
,{
"testCaseDescription": "go-struct-literals-replacement-insert-test",
"expectedResult": {
"changes": {
"struct-literals.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
4,
2
]
}
},
"summary": "Added the 's1' variable"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
5,
34
]
}
},
"summary": "Added the 's2' variable"
},
{
"span": {
"insert": {
"start": [
6,
1
],
"end": [
6,
24
]
}
},
"summary": "Added the 's3' variable"
},
{
"span": {
"insert": {
"start": [
7,
1
],
"end": [
10,
2
]
}
},
"summary": "Added the 's1' variable"
},
{
"span": {
"insert": {
"start": [
11,
1
],
"end": [
11,
32
]
}
},
"summary": "Added the 's2' variable"
},
{
"span": {
"insert": {
"start": [
12,
1
],
"end": [
12,
23
]
}
},
"summary": "Added the 's3' variable"
}
]
},
"errors": {}
},
"filePaths": [
"struct-literals.go"
],
"patch": [
"diff --git a/struct-literals.go b/struct-literals.go",
"index f949dbb..c6a242e 100644",
"--- a/struct-literals.go",
"+++ b/struct-literals.go",
"@@ -1,3 +1,15 @@",
"+const s1 = Dog{",
"+name: \"Frank\",",
"+Age: \"5 months\",",
"+}",
"+const s2 = struct{i float;}{j: 6}",
"+const s3 = time.Month{}",
"@@ -1,5 +1,10 @@",
" package main",
" ",
" func main() {",
"-",
"+const s1 = Person{",
"+name: \"Frank\",",
"+Age: \"5 months\",",
"+}",
"+const s2 = struct{i int;}{i: 5}",
"+const s3 = time.Time{}",
" const s1 = Person{",
" name: \"Frank\",",
" Age: \"5 months\","
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "f95070fc9ad568a31f1f26f714fca1b38e518d0f..69ccd2c4c78c59c85cec84a8f602af771f81b441"
}
,{
"testCaseDescription": "go-struct-literals-delete-insert-test",
"expectedResult": {
"changes": {
"struct-literals.go": [
{
"span": {
"replace": [
{
"start": [
1,
12
],
"end": [
1,
15
]
},
{
"start": [
1,
12
],
"end": [
1,
18
]
}
]
},
"summary": "Replaced the 'Dog' identifier with the 'Person' identifier in the s1 variable"
},
{
"span": {
"replace": [
{
"start": [
5,
21
],
"end": [
5,
26
]
},
{
"start": [
5,
21
],
"end": [
5,
24
]
}
]
},
"summary": "Replaced the 'float' identifier with the 'int' identifier in the s2 variable"
},
{
"span": {
"replace": [
{
"start": [
5,
29
],
"end": [
5,
30
]
},
{
"start": [
5,
27
],
"end": [
5,
28
]
}
]
},
"summary": "Replaced the 'j' identifier with the 'i' identifier in the s2 variable"
},
{
"span": {
"replace": [
{
"start": [
5,
32
],
"end": [
5,
33
]
},
{
"start": [
5,
30
],
"end": [
5,
31
]
}
]
},
"summary": "Replaced '6' with '5' in the s2 variable"
},
{
"span": {
"replace": [
{
"start": [
6,
17
],
"end": [
6,
22
]
},
{
"start": [
6,
17
],
"end": [
6,
21
]
}
]
},
"summary": "Replaced the 'Month' identifier with the 'Time' identifier in the s3 variable"
}
]
},
"errors": {}
},
"filePaths": [
"struct-literals.go"
],
"patch": [
"diff --git a/struct-literals.go b/struct-literals.go",
"index c6a242e..680652e 100644",
"--- a/struct-literals.go",
"+++ b/struct-literals.go",
"@@ -1,9 +1,9 @@",
"-const s1 = Dog{",
"+const s1 = Person{",
" name: \"Frank\",",
" Age: \"5 months\",",
" }",
"-const s2 = struct{i float;}{j: 6}",
"-const s3 = time.Month{}",
"+const s2 = struct{i int;}{i: 5}",
"+const s3 = time.Time{}",
" const s1 = Person{",
" name: \"Frank\",",
" Age: \"5 months\","
],
"gitDir": "test/corpus/repos/go",
"shas": "69ccd2c4c78c59c85cec84a8f602af771f81b441..18672cd492f61710467d45f0a0404eda67ef786f"
"shas": "b7aa559dab86c329ab14bbb2eafe55e9441616c9..d9ade99deb5308b89c0e181dde0456d599f990c6"
}
,{
"testCaseDescription": "go-struct-literals-replacement-test",
"expectedResult": {
"changes": {
"struct-literals.go": [
{
"span": {
"replace": [
{
"start": [
1,
12
],
"end": [
1,
18
]
},
{
"start": [
1,
12
],
"end": [
1,
15
]
}
]
},
"summary": "Replaced the 'Person' identifier with the 'Dog' identifier in the s1 variable"
},
{
"span": {
"replace": [
{
"start": [
5,
21
],
"end": [
5,
24
]
},
{
"start": [
5,
21
],
"end": [
5,
26
]
}
]
},
"summary": "Replaced the 'int' identifier with the 'float' identifier in the s2 variable"
},
{
"span": {
"replace": [
{
"start": [
5,
27
],
"end": [
5,
28
]
},
{
"start": [
5,
29
],
"end": [
5,
30
]
}
]
},
"summary": "Replaced the 'i' identifier with the 'j' identifier in the s2 variable"
},
{
"span": {
"replace": [
{
"start": [
5,
30
],
"end": [
5,
31
]
},
{
"start": [
5,
32
],
"end": [
5,
33
]
}
]
},
"summary": "Replaced '5' with '6' in the s2 variable"
},
{
"span": {
"replace": [
{
"start": [
6,
17
],
"end": [
6,
21
]
},
{
"start": [
6,
17
],
"end": [
6,
22
]
}
]
},
"summary": "Replaced the 'Time' identifier with the 'Month' identifier in the s3 variable"
}
]
},
"changes": {},
"errors": {}
},
"filePaths": [
@ -516,10 +81,13 @@
],
"patch": [
"diff --git a/struct-literals.go b/struct-literals.go",
"index 680652e..c6a242e 100644",
"index e6fd4f1..06724a4 100644",
"--- a/struct-literals.go",
"+++ b/struct-literals.go",
"@@ -1,9 +1,9 @@",
"@@ -1,10 +1,10 @@",
" package main",
" ",
" func main() {",
"-const s1 = Person{",
"+const s1 = Dog{",
" name: \"Frank\",",
@ -529,155 +97,15 @@
"-const s3 = time.Time{}",
"+const s2 = struct{i float;}{j: 6}",
"+const s3 = time.Month{}",
" const s1 = Person{",
" name: \"Frank\",",
" Age: \"5 months\","
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "18672cd492f61710467d45f0a0404eda67ef786f..3a6f5dd454cb71872be3981556590819ca08e4cd"
"shas": "d9ade99deb5308b89c0e181dde0456d599f990c6..f9cb6224ec86263e0a869784a0318adbcaedfded"
}
,{
"testCaseDescription": "go-struct-literals-delete-replacement-test",
"expectedResult": {
"changes": {
"struct-literals.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
4,
2
]
}
},
"summary": "Deleted the 's1' variable"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
5,
34
]
}
},
"summary": "Deleted the 's2' variable"
},
{
"span": {
"delete": {
"start": [
6,
1
],
"end": [
6,
24
]
}
},
"summary": "Deleted the 's3' variable"
},
{
"span": {
"delete": {
"start": [
7,
1
],
"end": [
10,
2
]
}
},
"summary": "Deleted the 's1' variable"
},
{
"span": {
"delete": {
"start": [
11,
1
],
"end": [
11,
32
]
}
},
"summary": "Deleted the 's2' variable"
},
{
"span": {
"delete": {
"start": [
12,
1
],
"end": [
12,
23
]
}
},
"summary": "Deleted the 's3' variable"
},
{
"span": {
"insert": {
"start": [
7,
1
],
"end": [
10,
2
]
}
},
"summary": "Added the 's1' variable"
},
{
"span": {
"insert": {
"start": [
11,
1
],
"end": [
11,
34
]
}
},
"summary": "Added the 's2' variable"
},
{
"span": {
"insert": {
"start": [
12,
1
],
"end": [
12,
24
]
}
},
"summary": "Added the 's3' variable"
}
]
},
"changes": {},
"errors": {}
},
"filePaths": [
@ -685,37 +113,59 @@
],
"patch": [
"diff --git a/struct-literals.go b/struct-literals.go",
"index c6a242e..5aaf236 100644",
"index 06724a4..e6fd4f1 100644",
"--- a/struct-literals.go",
"+++ b/struct-literals.go",
"@@ -1,18 +1,12 @@",
"@@ -1,10 +1,10 @@",
" package main",
" ",
" func main() {",
"-const s1 = Dog{",
"-name: \"Frank\",",
"-Age: \"5 months\",",
"-}",
"+const s1 = Person{",
" name: \"Frank\",",
" Age: \"5 months\",",
" }",
"-const s2 = struct{i float;}{j: 6}",
"-const s3 = time.Month{}",
" const s1 = Person{",
" name: \"Frank\",",
" Age: \"5 months\",",
" }",
" const s2 = struct{i int;}{i: 5}",
" const s3 = time.Time{}",
"-const s1 = Person{",
"+const s1 = Dog{",
" name: \"Frank\",",
" Age: \"5 months\",",
" }",
"-const s2 = struct{i int;}{i: 5}",
"-const s3 = time.Time{}",
"+const s2 = struct{i float;}{j: 6}",
"+const s3 = time.Month{}"
"+const s2 = struct{i int;}{i: 5}",
"+const s3 = time.Time{}",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "3a6f5dd454cb71872be3981556590819ca08e4cd..3b3bf2627d244b37a62ebdc901f39bccb4fa1a8d"
"shas": "f9cb6224ec86263e0a869784a0318adbcaedfded..1c1fd89d40ff03a1eb8812937a6e77a17594e44b"
}
,{
"testCaseDescription": "go-struct-literals-delete-test",
"testCaseDescription": "go-struct-literals-delete-insert-test",
"expectedResult": {
"changes": {},
"errors": {}
},
"filePaths": [
"struct-literals.go"
],
"patch": [
"diff --git a/struct-literals.go b/struct-literals.go",
"index e6fd4f1..7905807 100644",
"--- a/struct-literals.go",
"+++ b/struct-literals.go",
"@@ -1,10 +1,5 @@",
" package main",
" ",
" func main() {",
"-const s1 = Person{",
"-name: \"Frank\",",
"-Age: \"5 months\",",
"-}",
"-const s2 = struct{i int;}{i: 5}",
"-const s3 = time.Time{}",
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "1c1fd89d40ff03a1eb8812937a6e77a17594e44b..e63f149e0a9fea7a3995c7230537150196232bc0"
}
,{
"testCaseDescription": "go-struct-literals-teardown-test",
"expectedResult": {
"changes": {
"struct-literals.go": [
@ -727,42 +177,12 @@
1
],
"end": [
4,
2
]
}
},
"summary": "Deleted the 's1' variable"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
5,
32
]
}
},
"summary": "Deleted the 's2' variable"
},
{
"span": {
"delete": {
"start": [
6,
1
],
"end": [
6,
23
]
}
},
"summary": "Deleted the 's3' variable"
"summary": "Deleted the 'main' module"
}
]
},
@ -773,93 +193,16 @@
],
"patch": [
"diff --git a/struct-literals.go b/struct-literals.go",
"index 5aaf236..9f5ac64 100644",
"index 7905807..e69de29 100644",
"--- a/struct-literals.go",
"+++ b/struct-literals.go",
"@@ -1,9 +1,3 @@",
"-const s1 = Person{",
"-name: \"Frank\",",
"-Age: \"5 months\",",
"-}",
"-const s2 = struct{i int;}{i: 5}",
"-const s3 = time.Time{}",
" const s1 = Dog{",
" name: \"Frank\",",
" Age: \"5 months\","
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "3b3bf2627d244b37a62ebdc901f39bccb4fa1a8d..444283cd200e082d9380eae6c996da8d96be594d"
}
,{
"testCaseDescription": "go-struct-literals-delete-rest-test",
"expectedResult": {
"changes": {
"struct-literals.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
4,
2
]
}
},
"summary": "Deleted the 's1' variable"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
5,
34
]
}
},
"summary": "Deleted the 's2' variable"
},
{
"span": {
"delete": {
"start": [
6,
1
],
"end": [
6,
24
]
}
},
"summary": "Deleted the 's3' variable"
}
]
},
"errors": {}
},
"filePaths": [
"struct-literals.go"
],
"patch": [
"diff --git a/struct-literals.go b/struct-literals.go",
"index 9f5ac64..e69de29 100644",
"--- a/struct-literals.go",
"+++ b/struct-literals.go",
"@@ -1,6 +0,0 @@",
"-const s1 = Dog{",
"-name: \"Frank\",",
"-Age: \"5 months\",",
"-}",
"-const s2 = struct{i float;}{j: 6}",
"-const s3 = time.Month{}"
],
"gitDir": "test/corpus/repos/go",
"shas": "444283cd200e082d9380eae6c996da8d96be594d..7fd6dea031e26a02c1743a205dc1489a7e050468"
"shas": "e63f149e0a9fea7a3995c7230537150196232bc0..1c84cb51e325b0263f1b4b1aab41ebbacf00be1c"
}]

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,46 @@
[{
"testCaseDescription": "go-switch-statements-setup-test",
"expectedResult": {
"changes": {
"switch-statements.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"switch-statements.go"
],
"patch": [
"diff --git a/switch-statements.go b/switch-statements.go",
"index e69de29..7905807 100644",
"--- a/switch-statements.go",
"+++ b/switch-statements.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "4366e644d8418699b83785526961663dccfe411a..c2ba50709d20fd39ed00f1cf5a54bf4a2b8ee7bd"
}
,{
"testCaseDescription": "go-switch-statements-insert-test",
"expectedResult": {
"changes": {
@ -7,16 +49,16 @@
"span": {
"insert": {
"start": [
1,
4,
1
],
"end": [
4,
7,
2
]
}
},
"summary": "Added the 'branch' switch statement"
"summary": "Added the 'branch' switch statement in the main function of the 'main' module"
}
]
},
@ -27,273 +69,22 @@
],
"patch": [
"diff --git a/switch-statements.go b/switch-statements.go",
"index e69de29..e444d1e 100644",
"index 7905807..5cdd438 100644",
"--- a/switch-statements.go",
"+++ b/switch-statements.go",
"@@ -0,0 +1,4 @@",
"+switch { case x < y: f1()",
"+case x < z: g()",
"+case x == 4: h()",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "25238a93bb3b92d4e2609c44f320e44fd9f4b537..fa7dbbfc36d0753d67461de33813be5492beefc2"
}
,{
"testCaseDescription": "go-switch-statements-replacement-insert-test",
"expectedResult": {
"changes": {
"switch-statements.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
4,
2
]
}
},
"summary": "Added the 'branch' switch statement"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
8,
2
]
}
},
"summary": "Added the 'branch' switch statement"
}
]
},
"errors": {}
},
"filePaths": [
"switch-statements.go"
],
"patch": [
"diff --git a/switch-statements.go b/switch-statements.go",
"index e444d1e..e2e5cf3 100644",
"--- a/switch-statements.go",
"+++ b/switch-statements.go",
"@@ -1,3 +1,11 @@",
"+switch { case a < b: f1()",
"+case c < d: g()",
"+case e == 4: f()",
"+}",
"@@ -1,5 +1,8 @@",
" package main",
" ",
" func main() {",
"-",
"+switch { case x < y: f1()",
"+case x < z: g()",
"+case x == 4: h()",
"+}",
" switch { case x < y: f1()",
" case x < z: g()",
" case x == 4: h()"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "fa7dbbfc36d0753d67461de33813be5492beefc2..f989edd6b885f1d71d4c0caa94c2f66647dd74d2"
}
,{
"testCaseDescription": "go-switch-statements-delete-insert-test",
"expectedResult": {
"changes": {
"switch-statements.go": [
{
"span": {
"replace": [
{
"start": [
1,
15
],
"end": [
1,
16
]
},
{
"start": [
1,
15
],
"end": [
1,
16
]
}
]
},
"summary": "Replaced the 'a' identifier with the 'x' identifier in the 'branch' switch statement"
},
{
"span": {
"replace": [
{
"start": [
1,
19
],
"end": [
1,
20
]
},
{
"start": [
1,
19
],
"end": [
1,
20
]
}
]
},
"summary": "Replaced the 'b' identifier with the 'y' identifier in the 'branch' switch statement"
},
{
"span": {
"replace": [
{
"start": [
2,
6
],
"end": [
2,
7
]
},
{
"start": [
2,
6
],
"end": [
2,
7
]
}
]
},
"summary": "Replaced the 'c' identifier with the 'x' identifier in the 'branch' switch statement"
},
{
"span": {
"replace": [
{
"start": [
2,
10
],
"end": [
2,
11
]
},
{
"start": [
2,
10
],
"end": [
2,
11
]
}
]
},
"summary": "Replaced the 'd' identifier with the 'z' identifier in the 'branch' switch statement"
},
{
"span": {
"replace": [
{
"start": [
3,
6
],
"end": [
3,
7
]
},
{
"start": [
3,
6
],
"end": [
3,
7
]
}
]
},
"summary": "Replaced the 'e' identifier with the 'x' identifier in the 'branch' switch statement"
},
{
"span": {
"replace": [
{
"start": [
3,
14
],
"end": [
3,
15
]
},
{
"start": [
3,
14
],
"end": [
3,
15
]
}
]
},
"summary": "Replaced the 'f' identifier with the 'h' identifier in the h() function call"
}
]
},
"errors": {}
},
"filePaths": [
"switch-statements.go"
],
"patch": [
"diff --git a/switch-statements.go b/switch-statements.go",
"index e2e5cf3..143707d 100644",
"--- a/switch-statements.go",
"+++ b/switch-statements.go",
"@@ -1,6 +1,6 @@",
"-switch { case a < b: f1()",
"-case c < d: g()",
"-case e == 4: f()",
"+switch { case x < y: f1()",
"+case x < z: g()",
"+case x == 4: h()",
" }",
" switch { case x < y: f1()",
" case x < z: g()"
],
"gitDir": "test/corpus/repos/go",
"shas": "f989edd6b885f1d71d4c0caa94c2f66647dd74d2..573eec4554298c107f0fec98c9a0a9447e01419b"
"shas": "c2ba50709d20fd39ed00f1cf5a54bf4a2b8ee7bd..ac1b3c9ef8dd4deeb06f01c8fcfd9c1bf32ab6a2"
}
,{
"testCaseDescription": "go-switch-statements-replacement-test",
@ -305,162 +96,162 @@
"replace": [
{
"start": [
1,
4,
15
],
"end": [
1,
4,
16
]
},
{
"start": [
1,
4,
15
],
"end": [
1,
4,
16
]
}
]
},
"summary": "Replaced the 'x' identifier with the 'a' identifier in the 'branch' switch statement"
"summary": "Replaced the 'x' identifier with the 'a' identifier in the 'branch' switch statement of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
1,
4,
19
],
"end": [
1,
4,
20
]
},
{
"start": [
1,
4,
19
],
"end": [
1,
4,
20
]
}
]
},
"summary": "Replaced the 'y' identifier with the 'b' identifier in the 'branch' switch statement"
"summary": "Replaced the 'y' identifier with the 'b' identifier in the 'branch' switch statement of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
2,
5,
6
],
"end": [
2,
5,
7
]
},
{
"start": [
2,
5,
6
],
"end": [
2,
5,
7
]
}
]
},
"summary": "Replaced the 'x' identifier with the 'c' identifier in the 'branch' switch statement"
"summary": "Replaced the 'x' identifier with the 'c' identifier in the 'branch' switch statement of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
2,
5,
10
],
"end": [
2,
5,
11
]
},
{
"start": [
2,
5,
10
],
"end": [
2,
5,
11
]
}
]
},
"summary": "Replaced the 'z' identifier with the 'd' identifier in the 'branch' switch statement"
"summary": "Replaced the 'z' identifier with the 'd' identifier in the 'branch' switch statement of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
3,
6,
6
],
"end": [
3,
6,
7
]
},
{
"start": [
3,
6,
6
],
"end": [
3,
6,
7
]
}
]
},
"summary": "Replaced the 'x' identifier with the 'e' identifier in the 'branch' switch statement"
"summary": "Replaced the 'x' identifier with the 'e' identifier in the 'branch' switch statement of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
3,
6,
14
],
"end": [
3,
6,
15
]
},
{
"start": [
3,
6,
14
],
"end": [
3,
6,
15
]
}
]
},
"summary": "Replaced the 'h' identifier with the 'f' identifier in the f() function call"
"summary": "Replaced the 'h' identifier with the 'f' identifier in the f() function call of the 'main' function"
}
]
},
@ -471,10 +262,13 @@
],
"patch": [
"diff --git a/switch-statements.go b/switch-statements.go",
"index 143707d..e2e5cf3 100644",
"index 5cdd438..0b83893 100644",
"--- a/switch-statements.go",
"+++ b/switch-statements.go",
"@@ -1,6 +1,6 @@",
"@@ -1,8 +1,8 @@",
" package main",
" ",
" func main() {",
"-switch { case x < y: f1()",
"-case x < z: g()",
"-case x == 4: h()",
@ -482,11 +276,10 @@
"+case c < d: g()",
"+case e == 4: f()",
" }",
" switch { case x < y: f1()",
" case x < z: g()"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "573eec4554298c107f0fec98c9a0a9447e01419b..a5db4da268b58006496efe5e952f07dc3d2320db"
"shas": "ac1b3c9ef8dd4deeb06f01c8fcfd9c1bf32ab6a2..07bbf5c315a6e1542b074340f3e892b3b30ff023"
}
,{
"testCaseDescription": "go-switch-statements-delete-replacement-test",
@ -495,48 +288,165 @@
"switch-statements.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
4,
2
]
}
"replace": [
{
"start": [
4,
15
],
"end": [
4,
16
]
},
{
"start": [
4,
15
],
"end": [
4,
16
]
}
]
},
"summary": "Deleted the 'branch' switch statement"
"summary": "Replaced the 'a' identifier with the 'x' identifier in the 'branch' switch statement of the 'main' function"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
8,
2
]
}
"replace": [
{
"start": [
4,
19
],
"end": [
4,
20
]
},
{
"start": [
4,
19
],
"end": [
4,
20
]
}
]
},
"summary": "Deleted the 'branch' switch statement"
"summary": "Replaced the 'b' identifier with the 'y' identifier in the 'branch' switch statement of the 'main' function"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
8,
2
]
}
"replace": [
{
"start": [
5,
6
],
"end": [
5,
7
]
},
{
"start": [
5,
6
],
"end": [
5,
7
]
}
]
},
"summary": "Added the 'branch' switch statement"
"summary": "Replaced the 'c' identifier with the 'x' identifier in the 'branch' switch statement of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
5,
10
],
"end": [
5,
11
]
},
{
"start": [
5,
10
],
"end": [
5,
11
]
}
]
},
"summary": "Replaced the 'd' identifier with the 'z' identifier in the 'branch' switch statement of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
6,
6
],
"end": [
6,
7
]
},
{
"start": [
6,
6
],
"end": [
6,
7
]
}
]
},
"summary": "Replaced the 'e' identifier with the 'x' identifier in the 'branch' switch statement of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
6,
14
],
"end": [
6,
15
]
},
{
"start": [
6,
14
],
"end": [
6,
15
]
}
]
},
"summary": "Replaced the 'f' identifier with the 'h' identifier in the h() function call of the 'main' function"
}
]
},
@ -547,31 +457,27 @@
],
"patch": [
"diff --git a/switch-statements.go b/switch-statements.go",
"index e2e5cf3..6989d28 100644",
"index 0b83893..5cdd438 100644",
"--- a/switch-statements.go",
"+++ b/switch-statements.go",
"@@ -1,12 +1,8 @@",
"@@ -1,8 +1,8 @@",
" package main",
" ",
" func main() {",
"-switch { case a < b: f1()",
"-case c < d: g()",
"-case e == 4: f()",
"-}",
" switch { case x < y: f1()",
" case x < z: g()",
" case x == 4: h()",
"+switch { case x < y: f1()",
"+case x < z: g()",
"+case x == 4: h()",
" }",
"-switch { case x < y: f1()",
"-case x < z: g()",
"-case x == 4: h()",
"+switch { case a < b: f1()",
"+case c < d: g()",
"+case e == 4: f()",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "a5db4da268b58006496efe5e952f07dc3d2320db..fd7487d4446fc6042d809a0cdb59deee1ff4ae04"
"shas": "07bbf5c315a6e1542b074340f3e892b3b30ff023..2d5ba6ef232e1fa31554f082b24ff55466a3f4e1"
}
,{
"testCaseDescription": "go-switch-statements-delete-test",
"testCaseDescription": "go-switch-statements-delete-insert-test",
"expectedResult": {
"changes": {
"switch-statements.go": [
@ -579,16 +485,16 @@
"span": {
"delete": {
"start": [
1,
4,
1
],
"end": [
4,
7,
2
]
}
},
"summary": "Deleted the 'branch' switch statement"
"summary": "Deleted the 'branch' switch statement in the main function of the 'main' module"
}
]
},
@ -599,23 +505,25 @@
],
"patch": [
"diff --git a/switch-statements.go b/switch-statements.go",
"index 6989d28..eff174f 100644",
"index 5cdd438..7905807 100644",
"--- a/switch-statements.go",
"+++ b/switch-statements.go",
"@@ -1,7 +1,3 @@",
"@@ -1,8 +1,5 @@",
" package main",
" ",
" func main() {",
"-switch { case x < y: f1()",
"-case x < z: g()",
"-case x == 4: h()",
"-}",
" switch { case a < b: f1()",
" case c < d: g()",
" case e == 4: f()"
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "fd7487d4446fc6042d809a0cdb59deee1ff4ae04..e98129fc667415197589dc420de58f3b3d2886fc"
"shas": "2d5ba6ef232e1fa31554f082b24ff55466a3f4e1..acd4b68d31fa9ab17ebef1bf457435141470bd8e"
}
,{
"testCaseDescription": "go-switch-statements-delete-rest-test",
"testCaseDescription": "go-switch-statements-teardown-test",
"expectedResult": {
"changes": {
"switch-statements.go": [
@ -627,12 +535,12 @@
1
],
"end": [
4,
2
6,
1
]
}
},
"summary": "Deleted the 'branch' switch statement"
"summary": "Deleted the 'main' module"
}
]
},
@ -643,15 +551,16 @@
],
"patch": [
"diff --git a/switch-statements.go b/switch-statements.go",
"index eff174f..e69de29 100644",
"index 7905807..e69de29 100644",
"--- a/switch-statements.go",
"+++ b/switch-statements.go",
"@@ -1,4 +0,0 @@",
"-switch { case a < b: f1()",
"-case c < d: g()",
"-case e == 4: f()",
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "e98129fc667415197589dc420de58f3b3d2886fc..d0a9400c6fb3a520721068d06591be6dba11ccee"
"shas": "acd4b68d31fa9ab17ebef1bf457435141470bd8e..784ba67094d0251ca208b7a2224c320cec0e2a78"
}]

View File

@ -1,4 +1,46 @@
[{
"testCaseDescription": "go-type-assertion-expressions-setup-test",
"expectedResult": {
"changes": {
"type-assertion-expressions.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"type-assertion-expressions.go"
],
"patch": [
"diff --git a/type-assertion-expressions.go b/type-assertion-expressions.go",
"index e69de29..7905807 100644",
"--- a/type-assertion-expressions.go",
"+++ b/type-assertion-expressions.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "4787ffbe0a99ff9ebdab0557183ad6663dd746cb..eb26480258ff2bc98e67ab7ffc6dd7324c73287b"
}
,{
"testCaseDescription": "go-type-assertion-expressions-insert-test",
"expectedResult": {
"changes": {
@ -7,16 +49,16 @@
"span": {
"insert": {
"start": [
1,
4,
1
],
"end": [
1,
4,
13
]
}
},
"summary": "Added the 'x.(z.Person)' type assertion statement"
"summary": "Added the 'x.(z.Person)' type assertion statement in the main function of the 'main' module"
}
]
},
@ -27,176 +69,19 @@
],
"patch": [
"diff --git a/type-assertion-expressions.go b/type-assertion-expressions.go",
"index e69de29..0765038 100644",
"index 7905807..4f148f4 100644",
"--- a/type-assertion-expressions.go",
"+++ b/type-assertion-expressions.go",
"@@ -0,0 +1 @@",
"+x.(z.Person)"
],
"gitDir": "test/corpus/repos/go",
"shas": "fff4b5e3aa207b2f8d5dc8ddb03b550f79baec95..7cdaee711fdf7f7a97fc3269e28626252a4dc3dc"
}
,{
"testCaseDescription": "go-type-assertion-expressions-replacement-insert-test",
"expectedResult": {
"changes": {
"type-assertion-expressions.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
10
]
}
},
"summary": "Added the 'b.(c.Dog)' type assertion statement"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
13
]
}
},
"summary": "Added the 'x.(z.Person)' type assertion statement"
}
]
},
"errors": {}
},
"filePaths": [
"type-assertion-expressions.go"
],
"patch": [
"diff --git a/type-assertion-expressions.go b/type-assertion-expressions.go",
"index 0765038..56239fb 100644",
"--- a/type-assertion-expressions.go",
"+++ b/type-assertion-expressions.go",
"@@ -1 +1,3 @@",
"+b.(c.Dog)",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-",
"+x.(z.Person)",
" x.(z.Person)"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "7cdaee711fdf7f7a97fc3269e28626252a4dc3dc..2bccd29b12d301d0fa0744e890ae3afdba1f43bc"
}
,{
"testCaseDescription": "go-type-assertion-expressions-delete-insert-test",
"expectedResult": {
"changes": {
"type-assertion-expressions.go": [
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
2
]
},
{
"start": [
1,
1
],
"end": [
1,
2
]
}
]
},
"summary": "Replaced the 'b' identifier with the 'x' identifier"
},
{
"span": {
"replace": [
{
"start": [
1,
4
],
"end": [
1,
5
]
},
{
"start": [
1,
4
],
"end": [
1,
5
]
}
]
},
"summary": "Replaced the 'c' identifier with the 'z' identifier"
},
{
"span": {
"replace": [
{
"start": [
1,
6
],
"end": [
1,
9
]
},
{
"start": [
1,
6
],
"end": [
1,
12
]
}
]
},
"summary": "Replaced the 'Dog' identifier with the 'Person' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"type-assertion-expressions.go"
],
"patch": [
"diff --git a/type-assertion-expressions.go b/type-assertion-expressions.go",
"index 56239fb..de94018 100644",
"--- a/type-assertion-expressions.go",
"+++ b/type-assertion-expressions.go",
"@@ -1,3 +1,3 @@",
"-b.(c.Dog)",
"+x.(z.Person)",
" x.(z.Person)",
" x.(z.Person)"
],
"gitDir": "test/corpus/repos/go",
"shas": "2bccd29b12d301d0fa0744e890ae3afdba1f43bc..b774e03f1513e1139f22bbc3e116e2ff17168247"
"shas": "eb26480258ff2bc98e67ab7ffc6dd7324c73287b..ea2f8e77cef0ac12e49455af06ad6b5266c1e47a"
}
,{
"testCaseDescription": "go-type-assertion-expressions-replacement-test",
@ -208,81 +93,81 @@
"replace": [
{
"start": [
1,
4,
1
],
"end": [
1,
4,
2
]
},
{
"start": [
1,
4,
1
],
"end": [
1,
4,
2
]
}
]
},
"summary": "Replaced the 'x' identifier with the 'b' identifier"
"summary": "Replaced the 'x' identifier with the 'b' identifier in the main function of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
1,
4,
4
],
"end": [
1,
4,
5
]
},
{
"start": [
1,
4,
4
],
"end": [
1,
4,
5
]
}
]
},
"summary": "Replaced the 'z' identifier with the 'c' identifier"
"summary": "Replaced the 'z' identifier with the 'c' identifier in the main function of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
1,
4,
6
],
"end": [
1,
4,
12
]
},
{
"start": [
1,
4,
6
],
"end": [
1,
4,
9
]
}
]
},
"summary": "Replaced the 'Person' identifier with the 'Dog' identifier"
"summary": "Replaced the 'Person' identifier with the 'Dog' identifier in the main function of the 'main' module"
}
]
},
@ -293,17 +178,19 @@
],
"patch": [
"diff --git a/type-assertion-expressions.go b/type-assertion-expressions.go",
"index de94018..56239fb 100644",
"index 4f148f4..e7463b4 100644",
"--- a/type-assertion-expressions.go",
"+++ b/type-assertion-expressions.go",
"@@ -1,3 +1,3 @@",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-x.(z.Person)",
"+b.(c.Dog)",
" x.(z.Person)",
" x.(z.Person)"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "b774e03f1513e1139f22bbc3e116e2ff17168247..596b57a4b9a75038c3f5594caa3561a52de5dc16"
"shas": "ea2f8e77cef0ac12e49455af06ad6b5266c1e47a..284a7c6f31c9cbffd619559916a60dd3552c927e"
}
,{
"testCaseDescription": "go-type-assertion-expressions-delete-replacement-test",
@ -312,48 +199,84 @@
"type-assertion-expressions.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
10
]
}
"replace": [
{
"start": [
4,
1
],
"end": [
4,
2
]
},
{
"start": [
4,
1
],
"end": [
4,
2
]
}
]
},
"summary": "Deleted the 'b.(c.Dog)' type assertion statement"
"summary": "Replaced the 'b' identifier with the 'x' identifier in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
13
]
}
"replace": [
{
"start": [
4,
4
],
"end": [
4,
5
]
},
{
"start": [
4,
4
],
"end": [
4,
5
]
}
]
},
"summary": "Deleted the 'x.(z.Person)' type assertion statement"
"summary": "Replaced the 'c' identifier with the 'z' identifier in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
10
]
}
"replace": [
{
"start": [
4,
6
],
"end": [
4,
9
]
},
{
"start": [
4,
6
],
"end": [
4,
12
]
}
]
},
"summary": "Added the 'b.(c.Dog)' type assertion statement"
"summary": "Replaced the 'Dog' identifier with the 'Person' identifier in the main function of the 'main' module"
}
]
},
@ -364,20 +287,22 @@
],
"patch": [
"diff --git a/type-assertion-expressions.go b/type-assertion-expressions.go",
"index 56239fb..aa7c34c 100644",
"index e7463b4..4f148f4 100644",
"--- a/type-assertion-expressions.go",
"+++ b/type-assertion-expressions.go",
"@@ -1,3 +1,2 @@",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-b.(c.Dog)",
"-x.(z.Person)",
" x.(z.Person)",
"+b.(c.Dog)"
"+x.(z.Person)",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "596b57a4b9a75038c3f5594caa3561a52de5dc16..b9105039f8d9f039416e98ced5b9e80b8f7c7d40"
"shas": "284a7c6f31c9cbffd619559916a60dd3552c927e..e9a5fa496aed5a93a73eec21e7efe97e1761b5c7"
}
,{
"testCaseDescription": "go-type-assertion-expressions-delete-test",
"testCaseDescription": "go-type-assertion-expressions-delete-insert-test",
"expectedResult": {
"changes": {
"type-assertion-expressions.go": [
@ -385,16 +310,16 @@
"span": {
"delete": {
"start": [
1,
4,
1
],
"end": [
1,
4,
13
]
}
},
"summary": "Deleted the 'x.(z.Person)' type assertion statement"
"summary": "Deleted the 'x.(z.Person)' type assertion statement in the main function of the 'main' module"
}
]
},
@ -405,18 +330,22 @@
],
"patch": [
"diff --git a/type-assertion-expressions.go b/type-assertion-expressions.go",
"index aa7c34c..093a081 100644",
"index 4f148f4..7905807 100644",
"--- a/type-assertion-expressions.go",
"+++ b/type-assertion-expressions.go",
"@@ -1,2 +1 @@",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-x.(z.Person)",
" b.(c.Dog)"
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "b9105039f8d9f039416e98ced5b9e80b8f7c7d40..868316791e7a76d17ffd45113d8b0a74886f8c90"
"shas": "e9a5fa496aed5a93a73eec21e7efe97e1761b5c7..238bf48d2959a035c6b5db59784d24d28bced3ed"
}
,{
"testCaseDescription": "go-type-assertion-expressions-delete-rest-test",
"testCaseDescription": "go-type-assertion-expressions-teardown-test",
"expectedResult": {
"changes": {
"type-assertion-expressions.go": [
@ -428,12 +357,12 @@
1
],
"end": [
1,
10
6,
1
]
}
},
"summary": "Deleted the 'b.(c.Dog)' type assertion statement"
"summary": "Deleted the 'main' module"
}
]
},
@ -444,12 +373,16 @@
],
"patch": [
"diff --git a/type-assertion-expressions.go b/type-assertion-expressions.go",
"index 093a081..e69de29 100644",
"index 7905807..e69de29 100644",
"--- a/type-assertion-expressions.go",
"+++ b/type-assertion-expressions.go",
"@@ -1 +0,0 @@",
"-b.(c.Dog)"
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "868316791e7a76d17ffd45113d8b0a74886f8c90..5f76f266d80a0de28bb0535282f740664c37c11d"
"shas": "238bf48d2959a035c6b5db59784d24d28bced3ed..72cf80729e2fadb8c6e5da6657c8ee2da6497955"
}]

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,46 @@
[{
"testCaseDescription": "go-type-switch-statements-setup-test",
"expectedResult": {
"changes": {
"type-switch-statements.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"type-switch-statements.go"
],
"patch": [
"diff --git a/type-switch-statements.go b/type-switch-statements.go",
"index e69de29..7905807 100644",
"--- a/type-switch-statements.go",
"+++ b/type-switch-statements.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "784ba67094d0251ca208b7a2224c320cec0e2a78..c89ad225e307e6fbd3e2410ecb7baabc0c8348c7"
}
,{
"testCaseDescription": "go-type-switch-statements-insert-test",
"expectedResult": {
"changes": {
@ -7,16 +49,16 @@
"span": {
"insert": {
"start": [
1,
4,
1
],
"end": [
6,
9,
2
]
}
},
"summary": "Added the 'e' switch statement"
"summary": "Added the 'e' switch statement in the main function of the 'main' module"
}
]
},
@ -27,140 +69,24 @@
],
"patch": [
"diff --git a/type-switch-statements.go b/type-switch-statements.go",
"index e69de29..f353f0b 100644",
"index 7905807..fd377c7 100644",
"--- a/type-switch-statements.go",
"+++ b/type-switch-statements.go",
"@@ -0,0 +1,6 @@",
"+switch e.(type) {",
"+ case []Person:",
"+ a()",
"+ case *Dog:",
"+ break",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "d0a9400c6fb3a520721068d06591be6dba11ccee..a23aac7c9fe8328e6b75da50ba49937107ba5f13"
}
,{
"testCaseDescription": "go-type-switch-statements-replacement-insert-test",
"expectedResult": {
"changes": {
"type-switch-statements.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
2
]
}
},
"summary": "Added the 'b' switch statement"
},
{
"span": {
"insert": {
"start": [
7,
1
],
"end": [
12,
2
]
}
},
"summary": "Added the 'e' switch statement"
}
]
},
"errors": {}
},
"filePaths": [
"type-switch-statements.go"
],
"patch": [
"diff --git a/type-switch-statements.go b/type-switch-statements.go",
"index f353f0b..0c6eb84 100644",
"--- a/type-switch-statements.go",
"+++ b/type-switch-statements.go",
"@@ -1,3 +1,15 @@",
"+switch b.(type) {",
"+ case []Person:",
"+ a()",
"+ case *Dog:",
"+ break",
"+}",
"@@ -1,5 +1,10 @@",
" package main",
" ",
" func main() {",
"-",
"+switch e.(type) {",
"+ case []Person:",
"+ a()",
"+ case *Dog:",
"+ break",
"+}",
" switch e.(type) {",
" case []Person:",
" a()"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "a23aac7c9fe8328e6b75da50ba49937107ba5f13..a4d2458afbff43bdfdc321aa60d79fd3a9c7dd12"
}
,{
"testCaseDescription": "go-type-switch-statements-delete-insert-test",
"expectedResult": {
"changes": {
"type-switch-statements.go": [
{
"span": {
"replace": [
{
"start": [
1,
8
],
"end": [
1,
9
]
},
{
"start": [
1,
8
],
"end": [
1,
9
]
}
]
},
"summary": "Replaced the 'b' identifier with the 'e' identifier in the 'e' switch statement"
}
]
},
"errors": {}
},
"filePaths": [
"type-switch-statements.go"
],
"patch": [
"diff --git a/type-switch-statements.go b/type-switch-statements.go",
"index 0c6eb84..b373d6d 100644",
"--- a/type-switch-statements.go",
"+++ b/type-switch-statements.go",
"@@ -1,4 +1,4 @@",
"-switch b.(type) {",
"+switch e.(type) {",
" case []Person:",
" a()",
" case *Dog:"
],
"gitDir": "test/corpus/repos/go",
"shas": "a4d2458afbff43bdfdc321aa60d79fd3a9c7dd12..14d5cd3e4ef2783dc341266eb8c3d5b1aa4e38ec"
"shas": "c89ad225e307e6fbd3e2410ecb7baabc0c8348c7..87e4e8b3c78e7d4d05f47d6399946ae16e5c0587"
}
,{
"testCaseDescription": "go-type-switch-statements-replacement-test",
@ -172,27 +98,27 @@
"replace": [
{
"start": [
1,
4,
8
],
"end": [
1,
4,
9
]
},
{
"start": [
1,
4,
8
],
"end": [
1,
4,
9
]
}
]
},
"summary": "Replaced the 'e' identifier with the 'b' identifier in the 'b' switch statement"
"summary": "Replaced the 'e' identifier with the 'b' identifier in the 'b' switch statement of the 'main' function"
}
]
},
@ -203,10 +129,13 @@
],
"patch": [
"diff --git a/type-switch-statements.go b/type-switch-statements.go",
"index b373d6d..0c6eb84 100644",
"index fd377c7..f5ef4d8 100644",
"--- a/type-switch-statements.go",
"+++ b/type-switch-statements.go",
"@@ -1,4 +1,4 @@",
"@@ -1,7 +1,7 @@",
" package main",
" ",
" func main() {",
"-switch e.(type) {",
"+switch b.(type) {",
" case []Person:",
@ -214,7 +143,7 @@
" case *Dog:"
],
"gitDir": "test/corpus/repos/go",
"shas": "14d5cd3e4ef2783dc341266eb8c3d5b1aa4e38ec..8e72f862af8f610979e789498e06f3c10ab247c0"
"shas": "87e4e8b3c78e7d4d05f47d6399946ae16e5c0587..d5bbcf1ea237fed502468c4c2be75e9465508d57"
}
,{
"testCaseDescription": "go-type-switch-statements-delete-replacement-test",
@ -223,48 +152,30 @@
"type-switch-statements.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
6,
2
]
}
"replace": [
{
"start": [
4,
8
],
"end": [
4,
9
]
},
{
"start": [
4,
8
],
"end": [
4,
9
]
}
]
},
"summary": "Deleted the 'b' switch statement"
},
{
"span": {
"delete": {
"start": [
7,
1
],
"end": [
12,
2
]
}
},
"summary": "Deleted the 'e' switch statement"
},
{
"span": {
"insert": {
"start": [
7,
1
],
"end": [
12,
2
]
}
},
"summary": "Added the 'b' switch statement"
"summary": "Replaced the 'b' identifier with the 'e' identifier in the 'e' switch statement of the 'main' function"
}
]
},
@ -275,33 +186,24 @@
],
"patch": [
"diff --git a/type-switch-statements.go b/type-switch-statements.go",
"index 0c6eb84..64567d6 100644",
"index f5ef4d8..fd377c7 100644",
"--- a/type-switch-statements.go",
"+++ b/type-switch-statements.go",
"@@ -1,16 +1,10 @@",
"@@ -1,7 +1,7 @@",
" package main",
" ",
" func main() {",
"-switch b.(type) {",
"- case []Person:",
"- a()",
"- case *Dog:",
"- break",
"-}",
" switch e.(type) {",
" case []Person:",
" a()",
" case *Dog:",
" break",
" }",
"-switch e.(type) {",
"+switch b.(type) {",
"+switch e.(type) {",
" case []Person:",
" a()",
" case *Dog:"
],
"gitDir": "test/corpus/repos/go",
"shas": "8e72f862af8f610979e789498e06f3c10ab247c0..2da93d43c10edc4560f430395708b0a19deca7cf"
"shas": "d5bbcf1ea237fed502468c4c2be75e9465508d57..328649e7ea7f590e81ff958c16c3cdda77245659"
}
,{
"testCaseDescription": "go-type-switch-statements-delete-test",
"testCaseDescription": "go-type-switch-statements-delete-insert-test",
"expectedResult": {
"changes": {
"type-switch-statements.go": [
@ -309,16 +211,16 @@
"span": {
"delete": {
"start": [
1,
4,
1
],
"end": [
6,
9,
2
]
}
},
"summary": "Deleted the 'e' switch statement"
"summary": "Deleted the 'e' switch statement in the main function of the 'main' module"
}
]
},
@ -329,25 +231,27 @@
],
"patch": [
"diff --git a/type-switch-statements.go b/type-switch-statements.go",
"index 64567d6..047534a 100644",
"index fd377c7..7905807 100644",
"--- a/type-switch-statements.go",
"+++ b/type-switch-statements.go",
"@@ -1,9 +1,3 @@",
"@@ -1,10 +1,5 @@",
" package main",
" ",
" func main() {",
"-switch e.(type) {",
"- case []Person:",
"- a()",
"- case *Dog:",
"- break",
"-}",
" switch b.(type) {",
" case []Person:",
" a()"
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "2da93d43c10edc4560f430395708b0a19deca7cf..41efa01640ef05438abe68c7a166b50e79808f1c"
"shas": "328649e7ea7f590e81ff958c16c3cdda77245659..0e25ee53f17150bf105b5732abdc3b8b1219b516"
}
,{
"testCaseDescription": "go-type-switch-statements-delete-rest-test",
"testCaseDescription": "go-type-switch-statements-teardown-test",
"expectedResult": {
"changes": {
"type-switch-statements.go": [
@ -360,11 +264,11 @@
],
"end": [
6,
2
1
]
}
},
"summary": "Deleted the 'b' switch statement"
"summary": "Deleted the 'main' module"
}
]
},
@ -375,17 +279,16 @@
],
"patch": [
"diff --git a/type-switch-statements.go b/type-switch-statements.go",
"index 047534a..e69de29 100644",
"index 7905807..e69de29 100644",
"--- a/type-switch-statements.go",
"+++ b/type-switch-statements.go",
"@@ -1,6 +0,0 @@",
"-switch b.(type) {",
"- case []Person:",
"- a()",
"- case *Dog:",
"- break",
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "41efa01640ef05438abe68c7a166b50e79808f1c..c02f9252b66f4d334e7e4d5cc2b56665c5d0b45f"
"shas": "0e25ee53f17150bf105b5732abdc3b8b1219b516..6c4bbf5ef2baa704f1ff867d5d50d05e955555a3"
}]

View File

@ -1,121 +1,79 @@
[{
"testCaseDescription": "go-unary-expressions-setup-test",
"expectedResult": {
"changes": {
"unary-expressions.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"unary-expressions.go"
],
"patch": [
"diff --git a/unary-expressions.go b/unary-expressions.go",
"index e69de29..7905807 100644",
"--- a/unary-expressions.go",
"+++ b/unary-expressions.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "2073a10bbb142f082f85416880453bcf32bcda9d..40eba90af01a8eed72c83a8f6d6edf194a73526e"
}
,{
"testCaseDescription": "go-unary-expressions-insert-test",
"expectedResult": {
"changes": {
"unary-expressions.go": [
{
"span": {
"insert": {
"start": [
1,
4
],
"end": [
1,
5
]
}
},
"summary": "Added the 'a' identifier"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
7
]
}
},
"summary": "Added the 'identifier()' function call"
}
]
},
"errors": {}
},
"filePaths": [
"unary-expressions.go"
],
"patch": [
"diff --git a/unary-expressions.go b/unary-expressions.go",
"index e69de29..858c09a 100644",
"--- a/unary-expressions.go",
"+++ b/unary-expressions.go",
"@@ -0,0 +1,2 @@",
"+!<-a",
"+*foo()"
],
"gitDir": "test/corpus/repos/go",
"shas": "3403cd75b5874d1bc6c4c3c737525b7bd1271113..25caa48897bbba94e3ebd10df0cab8c1af27c26d"
}
,{
"testCaseDescription": "go-unary-expressions-replacement-insert-test",
"expectedResult": {
"changes": {
"unary-expressions.go": [
{
"span": {
"insert": {
"start": [
1,
4
],
"end": [
1,
5
]
}
},
"summary": "Added the 'b' identifier"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
7
]
}
},
"summary": "Added the 'identifier()' function call"
},
{
"span": {
"insert": {
"start": [
3,
4
],
"end": [
3,
5
]
}
},
"summary": "Added the 'a' identifier"
},
{
"span": {
"insert": {
"start": [
4,
1
4
],
"end": [
4,
5
]
}
},
"summary": "Added the 'a' identifier in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
5,
2
],
"end": [
5,
7
]
}
},
"summary": "Added the 'identifier()' function call"
"summary": "Added the 'foo()' function call in the main function of the 'main' module"
}
]
},
@ -126,102 +84,20 @@
],
"patch": [
"diff --git a/unary-expressions.go b/unary-expressions.go",
"index 858c09a..0b42f98 100644",
"index 7905807..bdf9ccc 100644",
"--- a/unary-expressions.go",
"+++ b/unary-expressions.go",
"@@ -1,2 +1,6 @@",
"+!<-b",
"+*bar()",
"@@ -1,5 +1,6 @@",
" package main",
" ",
" func main() {",
"-",
"+!<-a",
"+*foo()",
" !<-a",
" *foo()"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "25caa48897bbba94e3ebd10df0cab8c1af27c26d..75a33545386bf76a55b02340bd336b00602e323e"
}
,{
"testCaseDescription": "go-unary-expressions-delete-insert-test",
"expectedResult": {
"changes": {
"unary-expressions.go": [
{
"span": {
"replace": [
{
"start": [
1,
4
],
"end": [
1,
5
]
},
{
"start": [
1,
4
],
"end": [
1,
5
]
}
]
},
"summary": "Replaced the 'b' identifier with the 'a' identifier"
},
{
"span": {
"replace": [
{
"start": [
2,
2
],
"end": [
2,
5
]
},
{
"start": [
2,
2
],
"end": [
2,
5
]
}
]
},
"summary": "Replaced the 'bar' identifier with the 'foo' identifier in the identifier() function call"
}
]
},
"errors": {}
},
"filePaths": [
"unary-expressions.go"
],
"patch": [
"diff --git a/unary-expressions.go b/unary-expressions.go",
"index 0b42f98..25afb46 100644",
"--- a/unary-expressions.go",
"+++ b/unary-expressions.go",
"@@ -1,5 +1,5 @@",
"-!<-b",
"-*bar()",
"+!<-a",
"+*foo()",
" !<-a",
" *foo()",
" !<-a"
],
"gitDir": "test/corpus/repos/go",
"shas": "75a33545386bf76a55b02340bd336b00602e323e..32474c2bac0758793a5ff0f2139cab878545163a"
"shas": "40eba90af01a8eed72c83a8f6d6edf194a73526e..49d5a0a639a2aa4d136eed182ed61bd65c55441a"
}
,{
"testCaseDescription": "go-unary-expressions-replacement-test",
@ -233,54 +109,54 @@
"replace": [
{
"start": [
1,
4,
4
],
"end": [
1,
4,
5
]
},
{
"start": [
1,
4,
4
],
"end": [
1,
4,
5
]
}
]
},
"summary": "Replaced the 'a' identifier with the 'b' identifier"
"summary": "Replaced the 'a' identifier with the 'b' identifier in the main function of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
2,
5,
2
],
"end": [
2,
5,
5
]
},
{
"start": [
2,
5,
2
],
"end": [
2,
5,
5
]
}
]
},
"summary": "Replaced the 'foo' identifier with the 'bar' identifier in the identifier() function call"
"summary": "Replaced the 'foo' identifier with the 'bar' identifier in the bar() function call of the 'main' function"
}
]
},
@ -291,20 +167,21 @@
],
"patch": [
"diff --git a/unary-expressions.go b/unary-expressions.go",
"index 25afb46..0b42f98 100644",
"index bdf9ccc..cf8ed88 100644",
"--- a/unary-expressions.go",
"+++ b/unary-expressions.go",
"@@ -1,5 +1,5 @@",
"@@ -1,6 +1,6 @@",
" package main",
" ",
" func main() {",
"-!<-a",
"-*foo()",
"+!<-b",
"+*bar()",
" !<-a",
" *foo()",
" !<-a"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "32474c2bac0758793a5ff0f2139cab878545163a..36454e266744a461ca2dd6934a061dc63a7c7a63"
"shas": "49d5a0a639a2aa4d136eed182ed61bd65c55441a..0c37a6ef5b80880c89e109162fb7b1f9368e3a26"
}
,{
"testCaseDescription": "go-unary-expressions-delete-replacement-test",
@ -313,93 +190,57 @@
"unary-expressions.go": [
{
"span": {
"delete": {
"start": [
1,
4
],
"end": [
1,
5
]
}
"replace": [
{
"start": [
4,
4
],
"end": [
4,
5
]
},
{
"start": [
4,
4
],
"end": [
4,
5
]
}
]
},
"summary": "Deleted the 'b' identifier"
"summary": "Replaced the 'b' identifier with the 'a' identifier in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
7
]
}
"replace": [
{
"start": [
5,
2
],
"end": [
5,
5
]
},
{
"start": [
5,
2
],
"end": [
5,
5
]
}
]
},
"summary": "Deleted the 'identifier()' function call"
},
{
"span": {
"delete": {
"start": [
3,
4
],
"end": [
3,
5
]
}
},
"summary": "Deleted the 'a' identifier"
},
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
7
]
}
},
"summary": "Deleted the 'identifier()' function call"
},
{
"span": {
"insert": {
"start": [
3,
4
],
"end": [
3,
5
]
}
},
"summary": "Added the 'b' identifier"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
7
]
}
},
"summary": "Added the 'identifier()' function call"
"summary": "Replaced the 'bar' identifier with the 'foo' identifier in the foo() function call of the 'main' function"
}
]
},
@ -410,24 +251,24 @@
],
"patch": [
"diff --git a/unary-expressions.go b/unary-expressions.go",
"index 0b42f98..812fb68 100644",
"index cf8ed88..bdf9ccc 100644",
"--- a/unary-expressions.go",
"+++ b/unary-expressions.go",
"@@ -1,6 +1,4 @@",
"@@ -1,6 +1,6 @@",
" package main",
" ",
" func main() {",
"-!<-b",
"-*bar()",
"-!<-a",
"-*foo()",
" !<-a",
" *foo()",
"+!<-b",
"+*bar()"
"+!<-a",
"+*foo()",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "36454e266744a461ca2dd6934a061dc63a7c7a63..2c0c14abd00ce4615876508894c87c15ad9f49e3"
"shas": "0c37a6ef5b80880c89e109162fb7b1f9368e3a26..ebdf606a77d057f283bf933daa410457bf41ff1d"
}
,{
"testCaseDescription": "go-unary-expressions-delete-test",
"testCaseDescription": "go-unary-expressions-delete-insert-test",
"expectedResult": {
"changes": {
"unary-expressions.go": [
@ -435,31 +276,31 @@
"span": {
"delete": {
"start": [
1,
4,
4
],
"end": [
1,
4,
5
]
}
},
"summary": "Deleted the 'a' identifier"
"summary": "Deleted the 'a' identifier in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
2,
1
5,
2
],
"end": [
2,
5,
7
]
}
},
"summary": "Deleted the 'identifier()' function call"
"summary": "Deleted the 'foo()' function call in the main function of the 'main' module"
}
]
},
@ -470,20 +311,23 @@
],
"patch": [
"diff --git a/unary-expressions.go b/unary-expressions.go",
"index 812fb68..6da661d 100644",
"index bdf9ccc..7905807 100644",
"--- a/unary-expressions.go",
"+++ b/unary-expressions.go",
"@@ -1,4 +1,2 @@",
"@@ -1,6 +1,5 @@",
" package main",
" ",
" func main() {",
"-!<-a",
"-*foo()",
" !<-b",
" *bar()"
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "2c0c14abd00ce4615876508894c87c15ad9f49e3..742cb3cf4d2b7f71864c7795fd3307b8775538b3"
"shas": "ebdf606a77d057f283bf933daa410457bf41ff1d..266ee2941af4ebd1bba3661643bfb6c7d13679c6"
}
,{
"testCaseDescription": "go-unary-expressions-delete-rest-test",
"testCaseDescription": "go-unary-expressions-teardown-test",
"expectedResult": {
"changes": {
"unary-expressions.go": [
@ -492,30 +336,15 @@
"delete": {
"start": [
1,
4
],
"end": [
1,
5
]
}
},
"summary": "Deleted the 'b' identifier"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
7
6,
1
]
}
},
"summary": "Deleted the 'identifier()' function call"
"summary": "Deleted the 'main' module"
}
]
},
@ -526,13 +355,16 @@
],
"patch": [
"diff --git a/unary-expressions.go b/unary-expressions.go",
"index 6da661d..e69de29 100644",
"index 7905807..e69de29 100644",
"--- a/unary-expressions.go",
"+++ b/unary-expressions.go",
"@@ -1,2 +0,0 @@",
"-!<-b",
"-*bar()"
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "742cb3cf4d2b7f71864c7795fd3307b8775538b3..ecfd8333e0e37929a8029b0c03cec13c31e0f692"
"shas": "266ee2941af4ebd1bba3661643bfb6c7d13679c6..607cba0a92277692cac7fa2ddfebb5c9723e8d03"
}]

View File

@ -1,4 +1,46 @@
[{
"testCaseDescription": "go-var-declarations-with-no-expressions-setup-test",
"expectedResult": {
"changes": {
"var-declarations-with-no-expressions.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"var-declarations-with-no-expressions.go"
],
"patch": [
"diff --git a/var-declarations-with-no-expressions.go b/var-declarations-with-no-expressions.go",
"index e69de29..7905807 100644",
"--- a/var-declarations-with-no-expressions.go",
"+++ b/var-declarations-with-no-expressions.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "7a0c2077bea82c44688db922de533c1458bc2ed3..0ff4ca3ecf87f2bd4ea07e86bd3b43ba0fe89fc8"
}
,{
"testCaseDescription": "go-var-declarations-with-no-expressions-insert-test",
"expectedResult": {
"changes": {
@ -7,46 +49,46 @@
"span": {
"insert": {
"start": [
1,
4,
1
],
"end": [
1,
4,
13
]
}
},
"summary": "Added the 'zero' variable"
"summary": "Added the 'zero' variable in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
2,
5,
1
],
"end": [
2,
5,
20
]
}
},
"summary": "Added the 'one' variable"
"summary": "Added the 'one' variable in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
2,
5,
1
],
"end": [
2,
5,
20
]
}
},
"summary": "Added the 'two' variable"
"summary": "Added the 'two' variable in the main function of the 'main' module"
}
]
},
@ -57,243 +99,20 @@
],
"patch": [
"diff --git a/var-declarations-with-no-expressions.go b/var-declarations-with-no-expressions.go",
"index e69de29..f156385 100644",
"index 7905807..fcdc312 100644",
"--- a/var-declarations-with-no-expressions.go",
"+++ b/var-declarations-with-no-expressions.go",
"@@ -0,0 +1,2 @@",
"+var zero int",
"+var one, two uint64"
],
"gitDir": "test/corpus/repos/go",
"shas": "934c5da727053121abad016b81bcf0c4b922d4a9..cfdfa4a251864bbaee89d4be2a5ba16eba0f98f8"
}
,{
"testCaseDescription": "go-var-declarations-with-no-expressions-replacement-insert-test",
"expectedResult": {
"changes": {
"var-declarations-with-no-expressions.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
10
]
}
},
"summary": "Added the 'a' variable"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
16
]
}
},
"summary": "Added the 'b' variable"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
16
]
}
},
"summary": "Added the 'c' variable"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
13
]
}
},
"summary": "Added the 'zero' variable"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
20
]
}
},
"summary": "Added the 'one' variable"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
20
]
}
},
"summary": "Added the 'two' variable"
}
]
},
"errors": {}
},
"filePaths": [
"var-declarations-with-no-expressions.go"
],
"patch": [
"diff --git a/var-declarations-with-no-expressions.go b/var-declarations-with-no-expressions.go",
"index f156385..f696db9 100644",
"--- a/var-declarations-with-no-expressions.go",
"+++ b/var-declarations-with-no-expressions.go",
"@@ -1,2 +1,6 @@",
"+var a int",
"+var b, c uint64",
"@@ -1,5 +1,6 @@",
" package main",
" ",
" func main() {",
"-",
"+var zero int",
"+var one, two uint64",
" var zero int",
" var one, two uint64"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "cfdfa4a251864bbaee89d4be2a5ba16eba0f98f8..4af9f85b09daf7d4a3067911981a2cae680b660d"
}
,{
"testCaseDescription": "go-var-declarations-with-no-expressions-delete-insert-test",
"expectedResult": {
"changes": {
"var-declarations-with-no-expressions.go": [
{
"span": {
"replace": [
{
"start": [
1,
5
],
"end": [
1,
6
]
},
{
"start": [
1,
5
],
"end": [
1,
9
]
}
]
},
"summary": "Replaced the 'a' identifier with the 'zero' identifier"
},
{
"span": {
"replace": [
{
"start": [
2,
5
],
"end": [
2,
6
]
},
{
"start": [
2,
5
],
"end": [
2,
8
]
}
]
},
"summary": "Replaced the 'b' identifier with the 'one' identifier"
},
{
"span": {
"replace": [
{
"start": [
2,
8
],
"end": [
2,
9
]
},
{
"start": [
2,
10
],
"end": [
2,
13
]
}
]
},
"summary": "Replaced the 'c' identifier with the 'two' identifier"
}
]
},
"errors": {}
},
"filePaths": [
"var-declarations-with-no-expressions.go"
],
"patch": [
"diff --git a/var-declarations-with-no-expressions.go b/var-declarations-with-no-expressions.go",
"index f696db9..e5e3183 100644",
"--- a/var-declarations-with-no-expressions.go",
"+++ b/var-declarations-with-no-expressions.go",
"@@ -1,5 +1,5 @@",
"-var a int",
"-var b, c uint64",
"+var zero int",
"+var one, two uint64",
" var zero int",
" var one, two uint64",
" var zero int"
],
"gitDir": "test/corpus/repos/go",
"shas": "4af9f85b09daf7d4a3067911981a2cae680b660d..f6f49bc348b0a2c0217811c9c49e27e46d4e6eb8"
"shas": "0ff4ca3ecf87f2bd4ea07e86bd3b43ba0fe89fc8..aea95bd0777b65fc387177a492369f24db2f8afc"
}
,{
"testCaseDescription": "go-var-declarations-with-no-expressions-replacement-test",
@ -305,81 +124,81 @@
"replace": [
{
"start": [
1,
4,
5
],
"end": [
1,
4,
9
]
},
{
"start": [
1,
4,
5
],
"end": [
1,
4,
6
]
}
]
},
"summary": "Replaced the 'zero' identifier with the 'a' identifier"
"summary": "Replaced the 'zero' identifier with the 'a' identifier in the main function of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
2,
5,
5
],
"end": [
2,
5,
8
]
},
{
"start": [
2,
5,
5
],
"end": [
2,
5,
6
]
}
]
},
"summary": "Replaced the 'one' identifier with the 'b' identifier"
"summary": "Replaced the 'one' identifier with the 'b' identifier in the main function of the 'main' module"
},
{
"span": {
"replace": [
{
"start": [
2,
5,
10
],
"end": [
2,
5,
13
]
},
{
"start": [
2,
5,
8
],
"end": [
2,
5,
9
]
}
]
},
"summary": "Replaced the 'two' identifier with the 'c' identifier"
"summary": "Replaced the 'two' identifier with the 'c' identifier in the main function of the 'main' module"
}
]
},
@ -390,20 +209,21 @@
],
"patch": [
"diff --git a/var-declarations-with-no-expressions.go b/var-declarations-with-no-expressions.go",
"index e5e3183..f696db9 100644",
"index fcdc312..8aab74f 100644",
"--- a/var-declarations-with-no-expressions.go",
"+++ b/var-declarations-with-no-expressions.go",
"@@ -1,5 +1,5 @@",
"@@ -1,6 +1,6 @@",
" package main",
" ",
" func main() {",
"-var zero int",
"-var one, two uint64",
"+var a int",
"+var b, c uint64",
" var zero int",
" var one, two uint64",
" var zero int"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "f6f49bc348b0a2c0217811c9c49e27e46d4e6eb8..0f680098c076258ec348362f0f263dca661c617c"
"shas": "aea95bd0777b65fc387177a492369f24db2f8afc..6c48bd3006cfd2d68ad6238dd45a45d1a6b59c1e"
}
,{
"testCaseDescription": "go-var-declarations-with-no-expressions-delete-replacement-test",
@ -412,138 +232,84 @@
"var-declarations-with-no-expressions.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
10
]
}
"replace": [
{
"start": [
4,
5
],
"end": [
4,
6
]
},
{
"start": [
4,
5
],
"end": [
4,
9
]
}
]
},
"summary": "Deleted the 'a' variable"
"summary": "Replaced the 'a' identifier with the 'zero' identifier in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
16
]
}
"replace": [
{
"start": [
5,
5
],
"end": [
5,
6
]
},
{
"start": [
5,
5
],
"end": [
5,
8
]
}
]
},
"summary": "Deleted the 'b' variable"
"summary": "Replaced the 'b' identifier with the 'one' identifier in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
16
]
}
"replace": [
{
"start": [
5,
8
],
"end": [
5,
9
]
},
{
"start": [
5,
10
],
"end": [
5,
13
]
}
]
},
"summary": "Deleted the 'c' variable"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
3,
13
]
}
},
"summary": "Deleted the 'zero' variable"
},
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
20
]
}
},
"summary": "Deleted the 'one' variable"
},
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
20
]
}
},
"summary": "Deleted the 'two' variable"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
10
]
}
},
"summary": "Added the 'a' variable"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
16
]
}
},
"summary": "Added the 'b' variable"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
16
]
}
},
"summary": "Added the 'c' variable"
"summary": "Replaced the 'c' identifier with the 'two' identifier in the main function of the 'main' module"
}
]
},
@ -554,24 +320,24 @@
],
"patch": [
"diff --git a/var-declarations-with-no-expressions.go b/var-declarations-with-no-expressions.go",
"index f696db9..137ee10 100644",
"index 8aab74f..fcdc312 100644",
"--- a/var-declarations-with-no-expressions.go",
"+++ b/var-declarations-with-no-expressions.go",
"@@ -1,6 +1,4 @@",
"@@ -1,6 +1,6 @@",
" package main",
" ",
" func main() {",
"-var a int",
"-var b, c uint64",
"-var zero int",
"-var one, two uint64",
" var zero int",
" var one, two uint64",
"+var a int",
"+var b, c uint64"
"+var zero int",
"+var one, two uint64",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "0f680098c076258ec348362f0f263dca661c617c..b91d6b8dacfdb7c32799fd65a844cd65f999e6f5"
"shas": "6c48bd3006cfd2d68ad6238dd45a45d1a6b59c1e..220a8df85e95bc8b6147330b3c5be7bb5af9e263"
}
,{
"testCaseDescription": "go-var-declarations-with-no-expressions-delete-test",
"testCaseDescription": "go-var-declarations-with-no-expressions-delete-insert-test",
"expectedResult": {
"changes": {
"var-declarations-with-no-expressions.go": [
@ -579,46 +345,46 @@
"span": {
"delete": {
"start": [
1,
4,
1
],
"end": [
1,
4,
13
]
}
},
"summary": "Deleted the 'zero' variable"
"summary": "Deleted the 'zero' variable in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
2,
5,
1
],
"end": [
2,
5,
20
]
}
},
"summary": "Deleted the 'one' variable"
"summary": "Deleted the 'one' variable in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
2,
5,
1
],
"end": [
2,
5,
20
]
}
},
"summary": "Deleted the 'two' variable"
"summary": "Deleted the 'two' variable in the main function of the 'main' module"
}
]
},
@ -629,20 +395,23 @@
],
"patch": [
"diff --git a/var-declarations-with-no-expressions.go b/var-declarations-with-no-expressions.go",
"index 137ee10..443ec9e 100644",
"index fcdc312..7905807 100644",
"--- a/var-declarations-with-no-expressions.go",
"+++ b/var-declarations-with-no-expressions.go",
"@@ -1,4 +1,2 @@",
"@@ -1,6 +1,5 @@",
" package main",
" ",
" func main() {",
"-var zero int",
"-var one, two uint64",
" var a int",
" var b, c uint64"
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "b91d6b8dacfdb7c32799fd65a844cd65f999e6f5..7cbf36fbf74f4985dd2e5bc76f72956bd197f095"
"shas": "220a8df85e95bc8b6147330b3c5be7bb5af9e263..4894d30c2d159df17072aacf033a63c493bfa609"
}
,{
"testCaseDescription": "go-var-declarations-with-no-expressions-delete-rest-test",
"testCaseDescription": "go-var-declarations-with-no-expressions-teardown-test",
"expectedResult": {
"changes": {
"var-declarations-with-no-expressions.go": [
@ -654,42 +423,12 @@
1
],
"end": [
1,
10
]
}
},
"summary": "Deleted the 'a' variable"
},
{
"span": {
"delete": {
"start": [
2,
6,
1
],
"end": [
2,
16
]
}
},
"summary": "Deleted the 'b' variable"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
16
]
}
},
"summary": "Deleted the 'c' variable"
"summary": "Deleted the 'main' module"
}
]
},
@ -700,13 +439,16 @@
],
"patch": [
"diff --git a/var-declarations-with-no-expressions.go b/var-declarations-with-no-expressions.go",
"index 443ec9e..e69de29 100644",
"index 7905807..e69de29 100644",
"--- a/var-declarations-with-no-expressions.go",
"+++ b/var-declarations-with-no-expressions.go",
"@@ -1,2 +0,0 @@",
"-var a int",
"-var b, c uint64"
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "7cbf36fbf74f4985dd2e5bc76f72956bd197f095..87119afd9d847041735cf640ecc066ad2804a85f"
"shas": "4894d30c2d159df17072aacf033a63c493bfa609..53a6ccc76bdca521d59dba54f74e108a96e2ec04"
}]

View File

@ -1,4 +1,46 @@
[{
"testCaseDescription": "go-var-declarations-with-types-setup-test",
"expectedResult": {
"changes": {
"var-declarations-with-types.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"var-declarations-with-types.go"
],
"patch": [
"diff --git a/var-declarations-with-types.go b/var-declarations-with-types.go",
"index e69de29..7905807 100644",
"--- a/var-declarations-with-types.go",
"+++ b/var-declarations-with-types.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "70f6d349a6f160339b00860104e50562888c4747..ff733f41bd74b5a4a2f595d54408deb18f739803"
}
,{
"testCaseDescription": "go-var-declarations-with-types-insert-test",
"expectedResult": {
"changes": {
@ -7,46 +49,46 @@
"span": {
"insert": {
"start": [
1,
4,
1
],
"end": [
1,
4,
17
]
}
},
"summary": "Added the 'zero' variable"
"summary": "Added the 'zero' variable in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
2,
5,
1
],
"end": [
2,
5,
27
]
}
},
"summary": "Added the 'one' variable"
"summary": "Added the 'one' variable in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
2,
5,
1
],
"end": [
2,
5,
27
]
}
},
"summary": "Added the 'two' variable"
"summary": "Added the 'two' variable in the main function of the 'main' module"
}
]
},
@ -57,243 +99,20 @@
],
"patch": [
"diff --git a/var-declarations-with-types.go b/var-declarations-with-types.go",
"index e69de29..7fa0f78 100644",
"index 7905807..d946c80 100644",
"--- a/var-declarations-with-types.go",
"+++ b/var-declarations-with-types.go",
"@@ -0,0 +1,2 @@",
"+var zero int = 0",
"+var one, two uint64 = 1, 2"
],
"gitDir": "test/corpus/repos/go",
"shas": "4a563a4637d1f4bf47f9b6b9f47ca5acba82bfd2..bc75245000d830f0cc014c444f3a68bca289ed0a"
}
,{
"testCaseDescription": "go-var-declarations-with-types-replacement-insert-test",
"expectedResult": {
"changes": {
"var-declarations-with-types.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
14
]
}
},
"summary": "Added the 'a' variable"
},
{
"span": {
"insert": {
"start": [
2,
2
],
"end": [
2,
24
]
}
},
"summary": "Added the 'b' variable"
},
{
"span": {
"insert": {
"start": [
2,
2
],
"end": [
2,
24
]
}
},
"summary": "Added the 'c' variable"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
17
]
}
},
"summary": "Added the 'zero' variable"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
27
]
}
},
"summary": "Added the 'one' variable"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
27
]
}
},
"summary": "Added the 'two' variable"
}
]
},
"errors": {}
},
"filePaths": [
"var-declarations-with-types.go"
],
"patch": [
"diff --git a/var-declarations-with-types.go b/var-declarations-with-types.go",
"index 7fa0f78..bf0a293 100644",
"--- a/var-declarations-with-types.go",
"+++ b/var-declarations-with-types.go",
"@@ -1,2 +1,6 @@",
"+var a int = 0",
"+ var b, c uint64 = 1, 2",
"@@ -1,5 +1,6 @@",
" package main",
" ",
" func main() {",
"-",
"+var zero int = 0",
"+var one, two uint64 = 1, 2",
" var zero int = 0",
" var one, two uint64 = 1, 2"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "bc75245000d830f0cc014c444f3a68bca289ed0a..a9f4cd4a5019134807cf1f82ff1b74b7e90bdc50"
}
,{
"testCaseDescription": "go-var-declarations-with-types-delete-insert-test",
"expectedResult": {
"changes": {
"var-declarations-with-types.go": [
{
"span": {
"replace": [
{
"start": [
1,
5
],
"end": [
1,
6
]
},
{
"start": [
1,
5
],
"end": [
1,
9
]
}
]
},
"summary": "Replaced the 'a' identifier with the 'zero' identifier in the zero variable"
},
{
"span": {
"replace": [
{
"start": [
2,
6
],
"end": [
2,
7
]
},
{
"start": [
2,
5
],
"end": [
2,
8
]
}
]
},
"summary": "Replaced the 'b' identifier with the 'one' identifier in the one variable"
},
{
"span": {
"replace": [
{
"start": [
2,
9
],
"end": [
2,
10
]
},
{
"start": [
2,
10
],
"end": [
2,
13
]
}
]
},
"summary": "Replaced the 'c' identifier with the 'two' identifier in the two variable"
}
]
},
"errors": {}
},
"filePaths": [
"var-declarations-with-types.go"
],
"patch": [
"diff --git a/var-declarations-with-types.go b/var-declarations-with-types.go",
"index bf0a293..cba22b9 100644",
"--- a/var-declarations-with-types.go",
"+++ b/var-declarations-with-types.go",
"@@ -1,5 +1,5 @@",
"-var a int = 0",
"- var b, c uint64 = 1, 2",
"+var zero int = 0",
"+var one, two uint64 = 1, 2",
" var zero int = 0",
" var one, two uint64 = 1, 2",
" var zero int = 0"
],
"gitDir": "test/corpus/repos/go",
"shas": "a9f4cd4a5019134807cf1f82ff1b74b7e90bdc50..fddf3c784f6c2d1a53c3e3c6de720822d0e90f2a"
"shas": "ff733f41bd74b5a4a2f595d54408deb18f739803..d7ce9362de5e9bf8b683cd99151de8700fe52599"
}
,{
"testCaseDescription": "go-var-declarations-with-types-replacement-test",
@ -305,81 +124,81 @@
"replace": [
{
"start": [
1,
4,
5
],
"end": [
1,
4,
9
]
},
{
"start": [
1,
4,
5
],
"end": [
1,
4,
6
]
}
]
},
"summary": "Replaced the 'zero' identifier with the 'a' identifier in the a variable"
"summary": "Replaced the 'zero' identifier with the 'a' identifier in the a variable of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
2,
5,
5
],
"end": [
2,
5,
8
]
},
{
"start": [
2,
5,
6
],
"end": [
2,
5,
7
]
}
]
},
"summary": "Replaced the 'one' identifier with the 'b' identifier in the b variable"
"summary": "Replaced the 'one' identifier with the 'b' identifier in the b variable of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
2,
5,
10
],
"end": [
2,
5,
13
]
},
{
"start": [
2,
5,
9
],
"end": [
2,
5,
10
]
}
]
},
"summary": "Replaced the 'two' identifier with the 'c' identifier in the c variable"
"summary": "Replaced the 'two' identifier with the 'c' identifier in the c variable of the 'main' function"
}
]
},
@ -390,20 +209,21 @@
],
"patch": [
"diff --git a/var-declarations-with-types.go b/var-declarations-with-types.go",
"index cba22b9..bf0a293 100644",
"index d946c80..14683f6 100644",
"--- a/var-declarations-with-types.go",
"+++ b/var-declarations-with-types.go",
"@@ -1,5 +1,5 @@",
"@@ -1,6 +1,6 @@",
" package main",
" ",
" func main() {",
"-var zero int = 0",
"-var one, two uint64 = 1, 2",
"+var a int = 0",
"+ var b, c uint64 = 1, 2",
" var zero int = 0",
" var one, two uint64 = 1, 2",
" var zero int = 0"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "fddf3c784f6c2d1a53c3e3c6de720822d0e90f2a..873d8bbf42f8e863405179f45fd270a05f58baaf"
"shas": "d7ce9362de5e9bf8b683cd99151de8700fe52599..1a666bb673668709f6ef8fa36a8fee1bbf3711b8"
}
,{
"testCaseDescription": "go-var-declarations-with-types-delete-replacement-test",
@ -412,138 +232,84 @@
"var-declarations-with-types.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
14
]
}
"replace": [
{
"start": [
4,
5
],
"end": [
4,
6
]
},
{
"start": [
4,
5
],
"end": [
4,
9
]
}
]
},
"summary": "Deleted the 'a' variable"
"summary": "Replaced the 'a' identifier with the 'zero' identifier in the zero variable of the 'main' function"
},
{
"span": {
"delete": {
"start": [
2,
2
],
"end": [
2,
24
]
}
"replace": [
{
"start": [
5,
6
],
"end": [
5,
7
]
},
{
"start": [
5,
5
],
"end": [
5,
8
]
}
]
},
"summary": "Deleted the 'b' variable"
"summary": "Replaced the 'b' identifier with the 'one' identifier in the one variable of the 'main' function"
},
{
"span": {
"delete": {
"start": [
2,
2
],
"end": [
2,
24
]
}
"replace": [
{
"start": [
5,
9
],
"end": [
5,
10
]
},
{
"start": [
5,
10
],
"end": [
5,
13
]
}
]
},
"summary": "Deleted the 'c' variable"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
3,
17
]
}
},
"summary": "Deleted the 'zero' variable"
},
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
27
]
}
},
"summary": "Deleted the 'one' variable"
},
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
27
]
}
},
"summary": "Deleted the 'two' variable"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
14
]
}
},
"summary": "Added the 'a' variable"
},
{
"span": {
"insert": {
"start": [
4,
2
],
"end": [
4,
24
]
}
},
"summary": "Added the 'b' variable"
},
{
"span": {
"insert": {
"start": [
4,
2
],
"end": [
4,
24
]
}
},
"summary": "Added the 'c' variable"
"summary": "Replaced the 'c' identifier with the 'two' identifier in the two variable of the 'main' function"
}
]
},
@ -554,24 +320,24 @@
],
"patch": [
"diff --git a/var-declarations-with-types.go b/var-declarations-with-types.go",
"index bf0a293..bd11fef 100644",
"index 14683f6..d946c80 100644",
"--- a/var-declarations-with-types.go",
"+++ b/var-declarations-with-types.go",
"@@ -1,6 +1,4 @@",
"@@ -1,6 +1,6 @@",
" package main",
" ",
" func main() {",
"-var a int = 0",
"- var b, c uint64 = 1, 2",
"-var zero int = 0",
"-var one, two uint64 = 1, 2",
" var zero int = 0",
" var one, two uint64 = 1, 2",
"+var a int = 0",
"+ var b, c uint64 = 1, 2"
"+var zero int = 0",
"+var one, two uint64 = 1, 2",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "873d8bbf42f8e863405179f45fd270a05f58baaf..5d08dfef677b002958c94324b95ecc118be2c1de"
"shas": "1a666bb673668709f6ef8fa36a8fee1bbf3711b8..9ab4a89fba53c3c02b79f268db15c8af53ee5df8"
}
,{
"testCaseDescription": "go-var-declarations-with-types-delete-test",
"testCaseDescription": "go-var-declarations-with-types-delete-insert-test",
"expectedResult": {
"changes": {
"var-declarations-with-types.go": [
@ -579,46 +345,46 @@
"span": {
"delete": {
"start": [
1,
4,
1
],
"end": [
1,
4,
17
]
}
},
"summary": "Deleted the 'zero' variable"
"summary": "Deleted the 'zero' variable in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
2,
5,
1
],
"end": [
2,
5,
27
]
}
},
"summary": "Deleted the 'one' variable"
"summary": "Deleted the 'one' variable in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
2,
5,
1
],
"end": [
2,
5,
27
]
}
},
"summary": "Deleted the 'two' variable"
"summary": "Deleted the 'two' variable in the main function of the 'main' module"
}
]
},
@ -629,20 +395,23 @@
],
"patch": [
"diff --git a/var-declarations-with-types.go b/var-declarations-with-types.go",
"index bd11fef..6e0b7e7 100644",
"index d946c80..7905807 100644",
"--- a/var-declarations-with-types.go",
"+++ b/var-declarations-with-types.go",
"@@ -1,4 +1,2 @@",
"@@ -1,6 +1,5 @@",
" package main",
" ",
" func main() {",
"-var zero int = 0",
"-var one, two uint64 = 1, 2",
" var a int = 0",
" var b, c uint64 = 1, 2"
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "5d08dfef677b002958c94324b95ecc118be2c1de..771cd9d7d33a80c0327a1ecf0aea69a1c0e8dd0e"
"shas": "9ab4a89fba53c3c02b79f268db15c8af53ee5df8..18c518c4cfe17761ebf2456b5a37146f5c521673"
}
,{
"testCaseDescription": "go-var-declarations-with-types-delete-rest-test",
"testCaseDescription": "go-var-declarations-with-types-teardown-test",
"expectedResult": {
"changes": {
"var-declarations-with-types.go": [
@ -654,42 +423,12 @@
1
],
"end": [
1,
14
6,
1
]
}
},
"summary": "Deleted the 'a' variable"
},
{
"span": {
"delete": {
"start": [
2,
2
],
"end": [
2,
24
]
}
},
"summary": "Deleted the 'b' variable"
},
{
"span": {
"delete": {
"start": [
2,
2
],
"end": [
2,
24
]
}
},
"summary": "Deleted the 'c' variable"
"summary": "Deleted the 'main' module"
}
]
},
@ -700,13 +439,16 @@
],
"patch": [
"diff --git a/var-declarations-with-types.go b/var-declarations-with-types.go",
"index 6e0b7e7..e69de29 100644",
"index 7905807..e69de29 100644",
"--- a/var-declarations-with-types.go",
"+++ b/var-declarations-with-types.go",
"@@ -1,2 +0,0 @@",
"-var a int = 0",
"- var b, c uint64 = 1, 2"
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "771cd9d7d33a80c0327a1ecf0aea69a1c0e8dd0e..934c5da727053121abad016b81bcf0c4b922d4a9"
"shas": "18c518c4cfe17761ebf2456b5a37146f5c521673..7a0c2077bea82c44688db922de533c1458bc2ed3"
}]

View File

@ -1,4 +1,46 @@
[{
"testCaseDescription": "go-var-declarations-without-types-setup-test",
"expectedResult": {
"changes": {
"var-declarations-without-types.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"var-declarations-without-types.go"
],
"patch": [
"diff --git a/var-declarations-without-types.go b/var-declarations-without-types.go",
"index e69de29..7905807 100644",
"--- a/var-declarations-without-types.go",
"+++ b/var-declarations-without-types.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "880d1356428938ef5f360e9367e76e80a3642744..95c0d037fa896947129d9c4daf8f1c447a4dd50e"
}
,{
"testCaseDescription": "go-var-declarations-without-types-insert-test",
"expectedResult": {
"changes": {
@ -7,16 +49,16 @@
"span": {
"insert": {
"start": [
1,
4,
1
],
"end": [
1,
4,
13
]
}
},
"summary": "Added the 'zero' variable"
"summary": "Added the 'zero' variable in the main function of the 'main' module"
}
]
},
@ -27,179 +69,19 @@
],
"patch": [
"diff --git a/var-declarations-without-types.go b/var-declarations-without-types.go",
"index e69de29..8c7993a 100644",
"index 7905807..64f6074 100644",
"--- a/var-declarations-without-types.go",
"+++ b/var-declarations-without-types.go",
"@@ -0,0 +1 @@",
"+var zero = 0"
],
"gitDir": "test/corpus/repos/go",
"shas": "5352a466a13a8f3f02aa66c9a40c94ce75e0e613..9d6d497e69f31aa9df97506de0154a1e61f4d9e4"
}
,{
"testCaseDescription": "go-var-declarations-without-types-replacement-insert-test",
"expectedResult": {
"changes": {
"var-declarations-without-types.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
20
]
}
},
"summary": "Added the 'one' variable"
},
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
20
]
}
},
"summary": "Added the 'two' variable"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
13
]
}
},
"summary": "Added the 'zero' variable"
}
]
},
"errors": {}
},
"filePaths": [
"var-declarations-without-types.go"
],
"patch": [
"diff --git a/var-declarations-without-types.go b/var-declarations-without-types.go",
"index 8c7993a..80fe8ba 100644",
"--- a/var-declarations-without-types.go",
"+++ b/var-declarations-without-types.go",
"@@ -1 +1,3 @@",
"+var one, two = 1, 2",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-",
"+var zero = 0",
" var zero = 0"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "9d6d497e69f31aa9df97506de0154a1e61f4d9e4..ea6ae7e686e42ad7362086e079769670ea10936f"
}
,{
"testCaseDescription": "go-var-declarations-without-types-delete-insert-test",
"expectedResult": {
"changes": {
"var-declarations-without-types.go": [
{
"span": {
"replace": [
{
"start": [
1,
5
],
"end": [
1,
8
]
},
{
"start": [
1,
5
],
"end": [
1,
9
]
}
]
},
"summary": "Replaced the 'one' identifier with the 'zero' identifier in the zero variable"
},
{
"span": {
"replace": [
{
"start": [
1,
16
],
"end": [
1,
17
]
},
{
"start": [
1,
12
],
"end": [
1,
13
]
}
]
},
"summary": "Replaced '1' with '0' in the zero variable"
},
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
20
]
}
},
"summary": "Deleted the 'two' variable"
}
]
},
"errors": {}
},
"filePaths": [
"var-declarations-without-types.go"
],
"patch": [
"diff --git a/var-declarations-without-types.go b/var-declarations-without-types.go",
"index 80fe8ba..c4df5f9 100644",
"--- a/var-declarations-without-types.go",
"+++ b/var-declarations-without-types.go",
"@@ -1,3 +1,3 @@",
"-var one, two = 1, 2",
"+var zero = 0",
" var zero = 0",
" var zero = 0"
],
"gitDir": "test/corpus/repos/go",
"shas": "ea6ae7e686e42ad7362086e079769670ea10936f..1d7f81f8dedc3d055e53d2e148bc244fd223ba95"
"shas": "95c0d037fa896947129d9c4daf8f1c447a4dd50e..dcf3ec4d2c2dcaa866ac6e5259a1d48c41a5723d"
}
,{
"testCaseDescription": "go-var-declarations-without-types-replacement-test",
@ -211,69 +93,69 @@
"replace": [
{
"start": [
1,
4,
5
],
"end": [
1,
4,
9
]
},
{
"start": [
1,
4,
5
],
"end": [
1,
4,
8
]
}
]
},
"summary": "Replaced the 'zero' identifier with the 'one' identifier in the one variable"
"summary": "Replaced the 'zero' identifier with the 'one' identifier in the one variable of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
1,
4,
12
],
"end": [
1,
4,
13
]
},
{
"start": [
1,
4,
16
],
"end": [
1,
4,
17
]
}
]
},
"summary": "Replaced '0' with '1' in the one variable"
"summary": "Replaced '0' with '1' in the one variable of the 'main' function"
},
{
"span": {
"insert": {
"start": [
1,
4,
1
],
"end": [
1,
4,
20
]
}
},
"summary": "Added the 'two' variable"
"summary": "Added the 'two' variable in the main function of the 'main' module"
}
]
},
@ -284,17 +166,19 @@
],
"patch": [
"diff --git a/var-declarations-without-types.go b/var-declarations-without-types.go",
"index c4df5f9..80fe8ba 100644",
"index 64f6074..88a72ee 100644",
"--- a/var-declarations-without-types.go",
"+++ b/var-declarations-without-types.go",
"@@ -1,3 +1,3 @@",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-var zero = 0",
"+var one, two = 1, 2",
" var zero = 0",
" var zero = 0"
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "1d7f81f8dedc3d055e53d2e148bc244fd223ba95..9b622b9e582499d0adaf52cec95b949194138ebe"
"shas": "dcf3ec4d2c2dcaa866ac6e5259a1d48c41a5723d..ea6af88764fa28ade69dbe4019c442d384f3b0c3"
}
,{
"testCaseDescription": "go-var-declarations-without-types-delete-replacement-test",
@ -303,78 +187,72 @@
"var-declarations-without-types.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
20
]
}
"replace": [
{
"start": [
4,
5
],
"end": [
4,
8
]
},
{
"start": [
4,
5
],
"end": [
4,
9
]
}
]
},
"summary": "Deleted the 'one' variable"
"summary": "Replaced the 'one' identifier with the 'zero' identifier in the zero variable of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
4,
16
],
"end": [
4,
17
]
},
{
"start": [
4,
12
],
"end": [
4,
13
]
}
]
},
"summary": "Replaced '1' with '0' in the zero variable of the 'main' function"
},
{
"span": {
"delete": {
"start": [
1,
4,
1
],
"end": [
1,
4,
20
]
}
},
"summary": "Deleted the 'two' variable"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
13
]
}
},
"summary": "Deleted the 'zero' variable"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
20
]
}
},
"summary": "Added the 'one' variable"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
20
]
}
},
"summary": "Added the 'two' variable"
"summary": "Deleted the 'two' variable in the main function of the 'main' module"
}
]
},
@ -385,20 +263,22 @@
],
"patch": [
"diff --git a/var-declarations-without-types.go b/var-declarations-without-types.go",
"index 80fe8ba..0d0b543 100644",
"index 88a72ee..64f6074 100644",
"--- a/var-declarations-without-types.go",
"+++ b/var-declarations-without-types.go",
"@@ -1,3 +1,2 @@",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-var one, two = 1, 2",
"-var zero = 0",
" var zero = 0",
"+var one, two = 1, 2"
"+var zero = 0",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "9b622b9e582499d0adaf52cec95b949194138ebe..34a7c384276ec72530b60e7c7b97e7cd26bf8292"
"shas": "ea6af88764fa28ade69dbe4019c442d384f3b0c3..51731fdacb49031d89f916c74781be41dde63914"
}
,{
"testCaseDescription": "go-var-declarations-without-types-delete-test",
"testCaseDescription": "go-var-declarations-without-types-delete-insert-test",
"expectedResult": {
"changes": {
"var-declarations-without-types.go": [
@ -406,16 +286,16 @@
"span": {
"delete": {
"start": [
1,
4,
1
],
"end": [
1,
4,
13
]
}
},
"summary": "Deleted the 'zero' variable"
"summary": "Deleted the 'zero' variable in the main function of the 'main' module"
}
]
},
@ -426,18 +306,22 @@
],
"patch": [
"diff --git a/var-declarations-without-types.go b/var-declarations-without-types.go",
"index 0d0b543..c4a6ab5 100644",
"index 64f6074..7905807 100644",
"--- a/var-declarations-without-types.go",
"+++ b/var-declarations-without-types.go",
"@@ -1,2 +1 @@",
"@@ -1,5 +1,5 @@",
" package main",
" ",
" func main() {",
"-var zero = 0",
" var one, two = 1, 2"
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "34a7c384276ec72530b60e7c7b97e7cd26bf8292..8ef765a217c5233472add0c29d15341458c4b793"
"shas": "51731fdacb49031d89f916c74781be41dde63914..016d873e47ea39f71ab79c52cbaa01f17e27bec5"
}
,{
"testCaseDescription": "go-var-declarations-without-types-delete-rest-test",
"testCaseDescription": "go-var-declarations-without-types-teardown-test",
"expectedResult": {
"changes": {
"var-declarations-without-types.go": [
@ -449,27 +333,12 @@
1
],
"end": [
1,
20
]
}
},
"summary": "Deleted the 'one' variable"
},
{
"span": {
"delete": {
"start": [
1,
6,
1
],
"end": [
1,
20
]
}
},
"summary": "Deleted the 'two' variable"
"summary": "Deleted the 'main' module"
}
]
},
@ -480,12 +349,16 @@
],
"patch": [
"diff --git a/var-declarations-without-types.go b/var-declarations-without-types.go",
"index c4a6ab5..e69de29 100644",
"index 7905807..e69de29 100644",
"--- a/var-declarations-without-types.go",
"+++ b/var-declarations-without-types.go",
"@@ -1 +0,0 @@",
"-var one, two = 1, 2"
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "8ef765a217c5233472add0c29d15341458c4b793..4a563a4637d1f4bf47f9b6b9f47ca5acba82bfd2"
"shas": "016d873e47ea39f71ab79c52cbaa01f17e27bec5..70f6d349a6f160339b00860104e50562888c4747"
}]

View File

@ -3,259 +3,309 @@
"repoUrl": "https://github.com/joshvera/go.git",
"language": "go",
"fileExt": ".go",
"templateText": "package main\n",
"syntaxes": [
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "single-import-declarations",
"insert": "import \"net/http\"\nimport . \"some/dsl\"\nimport alias \"some/package\"",
"replacement": "import \"foo/bar\"\nimport . \"types/dsl\"\nimport alias \"awesome/packages\""
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "grouped-import-declarations",
"insert": "import (\n\"net/http\"\n . \"some/dsl\"\n alias \"some/package\"\n)",
"replacement": "import (\n\"net/socket\"\n . \"types/dsl\"\n alias \"awesome/package\"\n)"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "int-literals",
"insert": "const (\na = 1, b = 2, c = 3\n)",
"replacement": "const (\na = 4, b = 5, c = 6\n)"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "assignment-statements",
"insert": "a = 1\nb, c += 2, 3\nd *= 3\ne += 1",
"replacement": "x = 1\ny, c += 2, 3\nz *= 3\nh += 1"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "if-statements",
"insert": "if a() {\nb()\n}\nif a := b(); c {\nd()\n}\nif a() {\nb()\n} else {\nc()\n}",
"replacement": "if x() {\nb()\n}\nif y := b(); c {\nd()\n}\nif z() {\nb()\n} else {\nc()\n}"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "short-var-declarations",
"insert": "a, b := 1, 2",
"replacement": "x, y := 3, 4"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "call-expressions",
"insert": "x(b, c...)\ny(b, c,)\nz(b,c...,)",
"replacement": "a(b, c...)\nb(b, c,)\nc(b,c...,)"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "function-literals",
"insert": "const s1 = func(s string) (int, int) {\nreturn 1, 2\n}",
"replacement": "const s1 = func(b int) (string, string) {\nreturn 1, 2\n}"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "const-declarations-without-types",
"insert": "const zero = 0",
"replacement": "const one, two = 1, 2"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "const-declarations-with-types",
"insert": "const zero int = 0",
"replacement": "const one, two uiint64 = 1, 2"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "var-declarations-without-types",
"insert": "var zero = 0",
"replacement": "var one, two = 1, 2"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "var-declarations-with-types",
"insert": "var zero int = 0\nvar one, two uint64 = 1, 2",
"replacement": "var a int = 0\n var b, c uint64 = 1, 2"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "var-declarations-with-no-expressions",
"insert": "var zero int\nvar one, two uint64",
"replacement": "var a int\nvar b, c uint64"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "grouped-var-declarations",
"insert": "var (\nzero = 0\none = 1\n)",
"replacement": "var (\na = 0\nb = 1\n)"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "switch-statements",
"insert": "switch { case x < y: f1()\ncase x < z: g()\ncase x == 4: h()\n}",
"replacement": "switch { case a < b: f1()\ncase c < d: g()\ncase e == 4: f()\n}"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "type-switch-statements",
"insert": "switch e.(type) {\n case []Person:\n a()\n case *Dog:\n break\n}",
"replacement": "switch b.(type) {\n case []Person:\n a()\n case *Dog:\n break\n}"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "select-statements",
"insert": "select {\n case x := <-c:\n println(x)\n case y <- c:\n println(5)\n case <-time.After(1):\n println(6)\n default:\n return\n}",
"replacement": "select {\n case a := <-c:\n println(x)\n case b <- c:\n println(5)\n case <-time.After(2):\n println(6)\n default:\n return\n}"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "go-and-defer-statements",
"insert": "defer x.y()\ngo x.y()",
"replacement": "defer a.b()\ngo c.d()"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "label-statements",
"insert": "{\n insert_label:\n}",
"replacement": "{\n replacement_label:\n}"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "for-statements",
"insert": " for {\na()\ngoto loop\n}\nfor i := 0; i < 5; i++ {\na()\nbreak loop\n}\nfor ; i < 10; i++ {\na()\ncontinue loop2\n}\nfor ;; {\na()\ncontinue\n}\nfor x := range y {\na(x)\nbreak\n}",
"replacement": " for ;; {\na()\ngoto loop\n}\nfor x := range y {\na()\nbreak loop\n}\nfor ;; {\na()\ncontinue loop2\n}\nfor ; i < 10; i++ {\na()\ncontinue\n}\nfor {\na(x)\nbreak\n}"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "function-declarations",
"insert": "func f1() {}\nfunc f2(a int, b, c, d string) int {}\nfunc f2() (int, error) {}\nfunc f2() (result int, err error) {}",
"replacement": "func fa() {}\nfunc fb(a int, b, c, d string) int {}\nfunc fc() (int, error) {}\nfunc fd() (result int, err error) {}"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "single-line-function-declarations",
"insert": "func f1() { a() }\nfunc f2() { a(); b() }\nfunc f3() { a(); b(); }",
"replacement": "func g1() { a() }\nfunc g2() { a(); b() }\nfunc g3() { a(); b(); }"
},
{
"syntax": "variadic-function-declarations",
"template": "package main\n\nfunc main() {\n{0}\n}",
"insert": "func f1(a ...*int) {}\nfunc f2(...int) {}\nfunc f3(a, ...bool) {}",
"replacement": "func g1(a ...*int) {}\nfunc g2(...int) {}\nfunc g3(a, ...bool) {}"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "method-declarations",
"insert": "func (self Person) Equals(other Person) bool {}",
"replacement": "func (self Num) Equals(other Num) bool {}"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "type-declarations",
"insert": "type a b\ntype (\n a b\n c d\n )",
"replacement": "type a' b'\ntype (\n a' b'\n c' d'\n )"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "const-with-implicit-values",
"insert": "const (\n zero = iota\n one\n two\n )",
"replacement": "const (\n a = iota\n b\n c\n )"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "constructors",
"insert": "make(chan<- int)\nmake(chan<- int, (new - old))\nmake(chan<- int, 5, 10)\n new(map[string]string)",
"replacement": "make(chan<- string)\nmake(chan<- string, (new - old))\nmake(chan<- string, 7, 11)\n new(map[int]int)"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "selector-expressions",
"insert": "a.b.c()",
"replacement": "x.y.z()"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "indexing-expressions",
"insert": "a[1]\n b[:]\n c[1:]\n d[1:2]\n e[:2:3]\n f[1:2:3]",
"replacement": "z[:2]\n y[:1]\n x[1:]\n d[1:2]\n e[:2:3]\n f[1:2:3]"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "type-assertion-expressions",
"insert": "x.(z.Person)",
"replacement": "b.(c.Dog)"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "type-conversion-expressions",
"insert": "[]a.b(c.d)\n ([]a.b)(c.d)\n e.f(g)\n (e.f)(g)",
"replacement": "[]x.y(z.e)\n ([]f.g)(h.i)\n j.k(l)\n (m.n)(o)"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "unary-expressions",
"insert": "!<-a\n*foo()",
"replacement": "!<-b\n*bar()"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "float-literals",
"insert": "f1 = 1.5\nf2 = 1.5e100\nf3 = 1.5e+50\nf4 = 1.5e-5\nf5 = .5e-50",
"replacement": "f2 = 1.5\nf3 = 1.5e100\nf4 = 1.5e+50\nf5 = 1.5e-5\nf6 = .5e-50"
"replacement": "f1 = 2.6\nf2 = 2.6e211\nf3 = 2.6e+60\nf4 = 2.6e-7\nf5 = .6e-60"
},
{
"template": "package main\n{0}",
"syntax": "rune-literals",
"insert": "const (\na = '0'\nb = '\\''\nc = '\\\\'\nc = '\\n'\nc = '\\u0000'\nc = '\\U01234567'\n)",
"replacement": "const (\na = '1'\nb = '\\n''\nc = '\\u0011'\nc = '\\\\'\nc = '\\u0022'\nc = '\\U01234568'\n)"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "imaginary-literals",
"insert": "const (\na = 01i\nb = 1.e+100i\n)",
"replacement": "const (\na = 02i\nb = 1.e+103i\n)"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "string-literals",
"insert": "const (\na = \"0\"\nb = \"hello world\"\n)",
"replacement": "const (\na = \"2\"\nb = \"hi\"\n)"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "slice-literals",
"insert": "const s1 = []string{}\nconst s2 = []string{\"hi\"}\nconst s3 = []string{\n\"hi\",\n \"hello\",\n}",
"replacement": "const s1 = []string{\"sup\"}\nconst s2 = []string{\"hello\"}\nconst s3 = []string{\n\"bar\",\n \"baz\",\n}"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "array-with-implicit-length",
"insert": "const a1 = [...]int{1, 2, 3}",
"replacement": "const a1 = [...]int{4,5,6}"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "map-literals",
"insert": "const s = map[string]string{\n\"hi\": \"hello\",\n\"bye\": \"goodbye\",\n}",
"replacement": "const s = map[string]int{\n\"foo\": \"bar\",\n\"baz\": \"hello\",\n}"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "struct-literals",
"insert": "const s1 = Person{\nname: \"Frank\",\nAge: \"5 months\",\n}\nconst s2 = struct{i int;}{i: 5}\nconst s3 = time.Time{}",
"replacement": "const s1 = Dog{\nname: \"Frank\",\nAge: \"5 months\",\n}\nconst s2 = struct{i float;}{j: 6}\nconst s3 = time.Month{}"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "send-statements",
"insert": "foo <- 5",
"replacement": "bar <- 6"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "increment-decrement-statements",
"insert": "i++\nj--",
"replacement": "foo++\nx++"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "qualified-types",
"insert": "type a b.c",
"replacement": "type x y.z"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "array-types",
"insert": "type a [2+2]x",
"replacement": "type a [1+1]y"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "slice-types",
"insert": "type a []b\ntype c [][]d",
"replacement": "type a [][]p\ntype c []y"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "struct-types",
"insert": "type s1 struct {}\ntype s2 struct { Person }\ntype s3 struct {\nf, g int\n}\ntype s4 struct {\np.s1\n h int `json:\"h\"`\n}",
"replacement": "type t1 struct {}\ntype t2 struct { Person }\ntype t3 struct {\nf, g int\n}\ntype t4 struct {\np.s1\n h int `json:\"h\"`\n}"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "interface-types",
"insert": "type i1 interface {}\ntype i2 interface { io.Reader }\ntype i3 interface {\ni1\nio.Reader\n SomeMethod(s string) error\n}",
"replacement": "type j1 interface {}\ntype j2 interface { io.Reader }\ntype j3 interface {\ni1\nio.Reader\n SomeMethod(s string) error\n}"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "map-types",
"insert": "type m1 map[string]error",
"replacement": "type m1 map[int]error"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "pointer-types",
"insert": "type (\np1 *string\np2 **p1\n)",
"replacement": "type (\np1 *int\np2 **p3\n)"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "channel-types",
"insert": "type (\nc1 chan<- chan int\nc2 chan<- chan<- struct{}\nc3 chan<- <-chan int\n)",
"replacement": "type (\nc2 chan<- chan string\nc3 chan<- chan<- struct{}\nc4 chan<- <-chan string\n)"
},
{
"template": "package main\n\nfunc main() {\n{0}\n}",
"syntax": "function-types",
"insert": "type (\na func(int) int\nb func(int, string) (bool, error)\n)",
"replacement": "type (\nx func(string) string\ny func(string, int) (chan, error)\n)"

@ -1 +1 @@
Subproject commit 9a8e607838c835f05173da887153445f52079f01
Subproject commit f4350c51685347ef081e6fb4839cb7e4cfe9e7ca