1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 00:12:29 +03:00
semantic/test/corpus/diff-summaries/go/float-literals.json
2017-01-17 15:26:07 -05:00

641 lines
21 KiB
JSON

[{
"testCaseDescription": "go-float-literals-setup-test",
"expectedResult": {
"changes": {
"float-literals.go": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Added the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"float-literals.go"
],
"patch": [
"diff --git a/float-literals.go b/float-literals.go",
"index e69de29b..79058077 100644",
"--- a/float-literals.go",
"+++ b/float-literals.go",
"@@ -0,0 +1,5 @@",
"+package main",
"+",
"+func main() {",
"+",
"+}"
],
"gitDir": "test/corpus/repos/go",
"shas": "f5535c936fcd3af4df3da2046b73161b0f2290cc..5a84660824ed4e85a6a2d394afadbcfbbbf380be"
}
,{
"testCaseDescription": "go-float-literals-insert-test",
"expectedResult": {
"changes": {
"float-literals.go": [
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
9
]
}
},
"summary": "Added the 'f1' var assignment in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
5,
13
]
}
},
"summary": "Added the 'f2' var assignment in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
6,
1
],
"end": [
6,
13
]
}
},
"summary": "Added the 'f3' var assignment in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
7,
1
],
"end": [
7,
12
]
}
},
"summary": "Added the 'f4' var assignment in the main function of the 'main' module"
},
{
"span": {
"insert": {
"start": [
8,
1
],
"end": [
8,
12
]
}
},
"summary": "Added the 'f5' var assignment in the main function of the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"float-literals.go"
],
"patch": [
"diff --git a/float-literals.go b/float-literals.go",
"index 79058077..772bdb09 100644",
"--- a/float-literals.go",
"+++ b/float-literals.go",
"@@ -1,5 +1,9 @@",
" package main",
" ",
" func main() {",
"-",
"+f1 = 1.5",
"+f2 = 1.5e100",
"+f3 = 1.5e+50",
"+f4 = 1.5e-5",
"+f5 = .5e-50",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "5a84660824ed4e85a6a2d394afadbcfbbbf380be..826d19c54ec15c9dd29a83511524fe55ad87d35b"
}
,{
"testCaseDescription": "go-float-literals-replacement-test",
"expectedResult": {
"changes": {
"float-literals.go": [
{
"span": {
"replace": [
{
"start": [
4,
6
],
"end": [
4,
9
]
},
{
"start": [
4,
6
],
"end": [
4,
9
]
}
]
},
"summary": "Replaced the '1.5' float with the '2.6' float in the f1 var assignment of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
5,
6
],
"end": [
5,
13
]
},
{
"start": [
5,
6
],
"end": [
5,
13
]
}
]
},
"summary": "Replaced the '1.5e100' float with the '2.6e211' float in the f2 var assignment of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
6,
6
],
"end": [
6,
13
]
},
{
"start": [
6,
6
],
"end": [
6,
13
]
}
]
},
"summary": "Replaced the '1.5e+50' float with the '2.6e+60' float in the f3 var assignment of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
7,
6
],
"end": [
7,
12
]
},
{
"start": [
7,
6
],
"end": [
7,
12
]
}
]
},
"summary": "Replaced the '1.5e-5' float with the '2.6e-7' float in the f4 var assignment of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
8,
6
],
"end": [
8,
12
]
},
{
"start": [
8,
6
],
"end": [
8,
12
]
}
]
},
"summary": "Replaced the '.5e-50' float with the '.6e-60' float in the f5 var assignment of the 'main' function"
}
]
},
"errors": {}
},
"filePaths": [
"float-literals.go"
],
"patch": [
"diff --git a/float-literals.go b/float-literals.go",
"index 772bdb09..0818628b 100644",
"--- a/float-literals.go",
"+++ b/float-literals.go",
"@@ -1,9 +1,9 @@",
" package main",
" ",
" func main() {",
"-f1 = 1.5",
"-f2 = 1.5e100",
"-f3 = 1.5e+50",
"-f4 = 1.5e-5",
"-f5 = .5e-50",
"+f1 = 2.6",
"+f2 = 2.6e211",
"+f3 = 2.6e+60",
"+f4 = 2.6e-7",
"+f5 = .6e-60",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "826d19c54ec15c9dd29a83511524fe55ad87d35b..c08c89fa9d84dc404b82726023f2c04a40153211"
}
,{
"testCaseDescription": "go-float-literals-delete-replacement-test",
"expectedResult": {
"changes": {
"float-literals.go": [
{
"span": {
"replace": [
{
"start": [
4,
6
],
"end": [
4,
9
]
},
{
"start": [
4,
6
],
"end": [
4,
9
]
}
]
},
"summary": "Replaced the '2.6' float with the '1.5' float in the f1 var assignment of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
5,
6
],
"end": [
5,
13
]
},
{
"start": [
5,
6
],
"end": [
5,
13
]
}
]
},
"summary": "Replaced the '2.6e211' float with the '1.5e100' float in the f2 var assignment of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
6,
6
],
"end": [
6,
13
]
},
{
"start": [
6,
6
],
"end": [
6,
13
]
}
]
},
"summary": "Replaced the '2.6e+60' float with the '1.5e+50' float in the f3 var assignment of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
7,
6
],
"end": [
7,
12
]
},
{
"start": [
7,
6
],
"end": [
7,
12
]
}
]
},
"summary": "Replaced the '2.6e-7' float with the '1.5e-5' float in the f4 var assignment of the 'main' function"
},
{
"span": {
"replace": [
{
"start": [
8,
6
],
"end": [
8,
12
]
},
{
"start": [
8,
6
],
"end": [
8,
12
]
}
]
},
"summary": "Replaced the '.6e-60' float with the '.5e-50' float in the f5 var assignment of the 'main' function"
}
]
},
"errors": {}
},
"filePaths": [
"float-literals.go"
],
"patch": [
"diff --git a/float-literals.go b/float-literals.go",
"index 0818628b..772bdb09 100644",
"--- a/float-literals.go",
"+++ b/float-literals.go",
"@@ -1,9 +1,9 @@",
" package main",
" ",
" func main() {",
"-f1 = 2.6",
"-f2 = 2.6e211",
"-f3 = 2.6e+60",
"-f4 = 2.6e-7",
"-f5 = .6e-60",
"+f1 = 1.5",
"+f2 = 1.5e100",
"+f3 = 1.5e+50",
"+f4 = 1.5e-5",
"+f5 = .5e-50",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "c08c89fa9d84dc404b82726023f2c04a40153211..d9a93091aa6a4a2fa1bf8e43c33a46413ec3e477"
}
,{
"testCaseDescription": "go-float-literals-delete-insert-test",
"expectedResult": {
"changes": {
"float-literals.go": [
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
9
]
}
},
"summary": "Deleted the 'f1' var assignment in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
5,
13
]
}
},
"summary": "Deleted the 'f2' var assignment in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
6,
1
],
"end": [
6,
13
]
}
},
"summary": "Deleted the 'f3' var assignment in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
7,
1
],
"end": [
7,
12
]
}
},
"summary": "Deleted the 'f4' var assignment in the main function of the 'main' module"
},
{
"span": {
"delete": {
"start": [
8,
1
],
"end": [
8,
12
]
}
},
"summary": "Deleted the 'f5' var assignment in the main function of the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"float-literals.go"
],
"patch": [
"diff --git a/float-literals.go b/float-literals.go",
"index 772bdb09..79058077 100644",
"--- a/float-literals.go",
"+++ b/float-literals.go",
"@@ -1,9 +1,5 @@",
" package main",
" ",
" func main() {",
"-f1 = 1.5",
"-f2 = 1.5e100",
"-f3 = 1.5e+50",
"-f4 = 1.5e-5",
"-f5 = .5e-50",
"+",
" }"
],
"gitDir": "test/corpus/repos/go",
"shas": "d9a93091aa6a4a2fa1bf8e43c33a46413ec3e477..8b1dc087e778dc42016f5c1d5f71d3edf185b3f9"
}
,{
"testCaseDescription": "go-float-literals-teardown-test",
"expectedResult": {
"changes": {
"float-literals.go": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
6,
1
]
}
},
"summary": "Deleted the 'main' module"
}
]
},
"errors": {}
},
"filePaths": [
"float-literals.go"
],
"patch": [
"diff --git a/float-literals.go b/float-literals.go",
"index 79058077..e69de29b 100644",
"--- a/float-literals.go",
"+++ b/float-literals.go",
"@@ -1,5 +0,0 @@",
"-package main",
"-",
"-func main() {",
"-",
"-}"
],
"gitDir": "test/corpus/repos/go",
"shas": "8b1dc087e778dc42016f5c1d5f71d3edf185b3f9..544e59d0964fe4e59f0711b8d7c0a74002bf1e68"
}]