1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 23:11:50 +03:00
semantic/test/corpus/diff-summaries/go/int-literals.json
2017-01-25 11:45:50 -05:00

425 lines
13 KiB
JSON

[{
"testCaseDescription": "go-int-literals-setup-test",
"expectedResult": {
"changes": {
"int-literals.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"int-literals.go"
],
"patch": [
"diff --git a/int-literals.go b/int-literals.go",
"index e69de29b..79058077 100644",
"--- a/int-literals.go",
"+++ b/int-literals.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "2549cb80e80bc5b31112d297c394e60474f18ef3..2a68bd5b876603ef914e61970cb18676b4d1fdbc"
}
,{
"testCaseDescription": "go-int-literals-insert-test",
"expectedResult": {
"changes": {
"int-literals.go": [
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
5,
9
]
}
},
"summary": "Added the 'a' var assignment in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
5,
12
],
"end": [
5,
20
]
}
},
"summary": "Added the '2' var assignment in the main function of the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"int-literals.go"
],
"patch": [
"diff --git a/int-literals.go b/int-literals.go",
"index 79058077..38d36eca 100644",
"--- a/int-literals.go",
"+++ b/int-literals.go",
"@@ -1,5 +1,7 @@",
" package main",
" ",
" func main() {",
"-",
"+const (",
"+a = 1, b = 2, c = 3",
"+)",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "2a68bd5b876603ef914e61970cb18676b4d1fdbc..938b8dfce924c4e7ec551d601001cb90411fd6bb"
}
,{
"testCaseDescription": "go-int-literals-replacement-test",
"expectedResult": {
"changes": {
"int-literals.go": [
{
"span": {
"replace": [
{
"start": [
5,
5
],
"end": [
5,
6
]
},
{
"start": [
5,
5
],
"end": [
5,
6
]
}
]
},
"summary": "Replaced '1' with '4' in the a var assignment of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
5,
12
],
"end": [
5,
13
]
},
{
"start": [
5,
12
],
"end": [
5,
13
]
}
]
},
"summary": "Replaced '2' with '5' in the 5 var assignment of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
5,
19
],
"end": [
5,
20
]
},
{
"start": [
5,
19
],
"end": [
5,
20
]
}
]
},
"summary": "Replaced '3' with '6' in the 5 var assignment of the 'main' function"
}
]
},
"errors": {}
},
"filePaths": [
"int-literals.go"
],
"patch": [
"diff --git a/int-literals.go b/int-literals.go",
"index 38d36eca..4f07c130 100644",
"--- a/int-literals.go",
"+++ b/int-literals.go",
"@@ -2,6 +2,6 @@ package main",
" ",
" func main() {",
" const (",
"-a = 1, b = 2, c = 3",
"+a = 4, b = 5, c = 6",
" )",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "938b8dfce924c4e7ec551d601001cb90411fd6bb..8d2981f6034c302865b58ce0a0cc3c63c11d96d1"
}
,{
"testCaseDescription": "go-int-literals-delete-replacement-test",
"expectedResult": {
"changes": {
"int-literals.go": [
{
"span": {
"replace": [
{
"start": [
5,
5
],
"end": [
5,
6
]
},
{
"start": [
5,
5
],
"end": [
5,
6
]
}
]
},
"summary": "Replaced '4' with '1' in the a var assignment of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
5,
12
],
"end": [
5,
13
]
},
{
"start": [
5,
12
],
"end": [
5,
13
]
}
]
},
"summary": "Replaced '5' with '2' in the 2 var assignment of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
5,
19
],
"end": [
5,
20
]
},
{
"start": [
5,
19
],
"end": [
5,
20
]
}
]
},
"summary": "Replaced '6' with '3' in the 2 var assignment of the 'main' function"
}
]
},
"errors": {}
},
"filePaths": [
"int-literals.go"
],
"patch": [
"diff --git a/int-literals.go b/int-literals.go",
"index 4f07c130..38d36eca 100644",
"--- a/int-literals.go",
"+++ b/int-literals.go",
"@@ -2,6 +2,6 @@ package main",
" ",
" func main() {",
" const (",
"-a = 4, b = 5, c = 6",
"+a = 1, b = 2, c = 3",
" )",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "8d2981f6034c302865b58ce0a0cc3c63c11d96d1..500fd8fd375b43fc6c057dc6a8acae5d4faefa0c"
}
,{
"testCaseDescription": "go-int-literals-delete-insert-test",
"expectedResult": {
"changes": {
"int-literals.go": [
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
5,
9
]
}
},
"summary": "Deleted the 'a' var assignment in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
5,
12
],
"end": [
5,
20
]
}
},
"summary": "Deleted the '2' var assignment in the main function of the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"int-literals.go"
],
"patch": [
"diff --git a/int-literals.go b/int-literals.go",
"index 38d36eca..79058077 100644",
"--- a/int-literals.go",
"+++ b/int-literals.go",
"@@ -1,7 +1,5 @@",
" package main",
" ",
" func main() {",
"-const (",
"-a = 1, b = 2, c = 3",
"-)",
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "500fd8fd375b43fc6c057dc6a8acae5d4faefa0c..0ba87411b617e54979ac350c84c3f611a982e902"
}
,{
"testCaseDescription": "go-int-literals-teardown-test",
"expectedResult": {
"changes": {
"int-literals.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Deleted the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"int-literals.go"
],
"patch": [
"diff --git a/int-literals.go b/int-literals.go",
"index 79058077..e69de29b 100644",
"--- a/int-literals.go",
"+++ b/int-literals.go",
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "0ba87411b617e54979ac350c84c3f611a982e902..399c47d31e2ad439f8e49bf4680be0812e9b4cc5"
}]