mirror of
https://github.com/github/semantic.git
synced 2024-12-23 23:11:50 +03:00
641 lines
21 KiB
JSON
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 e69de29..7905807 100644",
|
|
"--- a/float-literals.go",
|
|
"+++ b/float-literals.go",
|
|
"@@ -0,0 +1,5 @@",
|
|
"+package main",
|
|
"+",
|
|
"+func main() {",
|
|
"+",
|
|
"+}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "f346e88e7625fee5e8f6d7f5bd7042e6590a9d2e..acdf0da08ca33add6ba238c882e3b65fc98c1724"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-float-literals-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"float-literals.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
9
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'f1' assignment in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'f2' assignment in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'f3' assignment in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
7,
|
|
1
|
|
],
|
|
"end": [
|
|
7,
|
|
12
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'f4' assignment in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
8,
|
|
1
|
|
],
|
|
"end": [
|
|
8,
|
|
12
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'f5' 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 7905807..772bdb0 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": "acdf0da08ca33add6ba238c882e3b65fc98c1724..2e695aca55d6149ecc9f7e691547fbdd3b2fb96a"
|
|
}
|
|
,{
|
|
"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 an assignment to f1 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 an assignment to f2 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 an assignment to f3 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 an assignment to f4 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 an assignment to f5 of the 'main' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"float-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/float-literals.go b/float-literals.go",
|
|
"index 772bdb0..0818628 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": "2e695aca55d6149ecc9f7e691547fbdd3b2fb96a..600217ad7857033e9d44b23fb78745a2991648a5"
|
|
}
|
|
,{
|
|
"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 an assignment to f1 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 an assignment to f2 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 an assignment to f3 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 an assignment to f4 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 an assignment to f5 of the 'main' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"float-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/float-literals.go b/float-literals.go",
|
|
"index 0818628..772bdb0 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": "600217ad7857033e9d44b23fb78745a2991648a5..76b2c3b6dc03c112d574433e13adf557e5fba5fe"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-float-literals-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"float-literals.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
9
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'f1' assignment in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'f2' assignment in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'f3' assignment in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
7,
|
|
1
|
|
],
|
|
"end": [
|
|
7,
|
|
12
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'f4' assignment in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
8,
|
|
1
|
|
],
|
|
"end": [
|
|
8,
|
|
12
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'f5' 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 772bdb0..7905807 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": "76b2c3b6dc03c112d574433e13adf557e5fba5fe..c3777e480f67addccddc345efff66c6ff4afb8df"
|
|
}
|
|
,{
|
|
"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 7905807..e69de29 100644",
|
|
"--- a/float-literals.go",
|
|
"+++ b/float-literals.go",
|
|
"@@ -1,5 +0,0 @@",
|
|
"-package main",
|
|
"-",
|
|
"-func main() {",
|
|
"-",
|
|
"-}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "c3777e480f67addccddc345efff66c6ff4afb8df..747db897a06270aa19ea8682dc582e46677b713a"
|
|
}]
|