mirror of
https://github.com/github/semantic.git
synced 2024-12-24 23:42:31 +03:00
377 lines
12 KiB
JSON
377 lines
12 KiB
JSON
[{
|
|
"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": "76f08190bffba036fc899c8b7180778ed761c374..73557f695fe16d27eb9b1fc8098f03c4a9b919e0"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-imaginary-literals-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"imaginary-literals.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a' var assignment in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'b' var assignment in the main function of the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"imaginary-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/imaginary-literals.go b/imaginary-literals.go",
|
|
"index 7905807..25a97da 100644",
|
|
"--- a/imaginary-literals.go",
|
|
"+++ b/imaginary-literals.go",
|
|
"@@ -1,5 +1,8 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-",
|
|
"+const (",
|
|
"+a = 01i",
|
|
"+b = 1.e+100i",
|
|
"+)",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "73557f695fe16d27eb9b1fc8098f03c4a9b919e0..0b7d6dbe051914737a78252de343f8099220d9ea"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-imaginary-literals-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"imaginary-literals.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
5
|
|
],
|
|
"end": [
|
|
5,
|
|
8
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
5
|
|
],
|
|
"end": [
|
|
5,
|
|
8
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the '01i' imaginary_literal with the '02i' imaginary_literal in the a var assignment of the 'main' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
6,
|
|
5
|
|
],
|
|
"end": [
|
|
6,
|
|
13
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
6,
|
|
5
|
|
],
|
|
"end": [
|
|
6,
|
|
13
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the '1.e+100i' imaginary_literal with the '1.e+103i' imaginary_literal in the b var assignment of the 'main' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"imaginary-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/imaginary-literals.go b/imaginary-literals.go",
|
|
"index 25a97da..151a533 100644",
|
|
"--- a/imaginary-literals.go",
|
|
"+++ b/imaginary-literals.go",
|
|
"@@ -2,7 +2,7 @@ package main",
|
|
" ",
|
|
" func main() {",
|
|
" const (",
|
|
"-a = 01i",
|
|
"-b = 1.e+100i",
|
|
"+a = 02i",
|
|
"+b = 1.e+103i",
|
|
" )",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "0b7d6dbe051914737a78252de343f8099220d9ea..0949c5bc9b2db32638751fdd8adf85141aaf671e"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-imaginary-literals-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"imaginary-literals.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
5
|
|
],
|
|
"end": [
|
|
5,
|
|
8
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
5
|
|
],
|
|
"end": [
|
|
5,
|
|
8
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the '02i' imaginary_literal with the '01i' imaginary_literal in the a var assignment of the 'main' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
6,
|
|
5
|
|
],
|
|
"end": [
|
|
6,
|
|
13
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
6,
|
|
5
|
|
],
|
|
"end": [
|
|
6,
|
|
13
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the '1.e+103i' imaginary_literal with the '1.e+100i' imaginary_literal in the b var assignment of the 'main' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"imaginary-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/imaginary-literals.go b/imaginary-literals.go",
|
|
"index 151a533..25a97da 100644",
|
|
"--- a/imaginary-literals.go",
|
|
"+++ b/imaginary-literals.go",
|
|
"@@ -2,7 +2,7 @@ package main",
|
|
" ",
|
|
" func main() {",
|
|
" const (",
|
|
"-a = 02i",
|
|
"-b = 1.e+103i",
|
|
"+a = 01i",
|
|
"+b = 1.e+100i",
|
|
" )",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "0949c5bc9b2db32638751fdd8adf85141aaf671e..13ce221827e5ffc32a3c99f95908373f67687e9c"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-imaginary-literals-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"imaginary-literals.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a' var assignment in the main function of the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'b' var assignment in the main function of the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"imaginary-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/imaginary-literals.go b/imaginary-literals.go",
|
|
"index 25a97da..7905807 100644",
|
|
"--- a/imaginary-literals.go",
|
|
"+++ b/imaginary-literals.go",
|
|
"@@ -1,8 +1,5 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-const (",
|
|
"-a = 01i",
|
|
"-b = 1.e+100i",
|
|
"-)",
|
|
"+",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "13ce221827e5ffc32a3c99f95908373f67687e9c..856d716acddaf6e7e91667c5627f39bc32477b7c"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-imaginary-literals-teardown-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"imaginary-literals.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"imaginary-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/imaginary-literals.go b/imaginary-literals.go",
|
|
"index 7905807..e69de29 100644",
|
|
"--- a/imaginary-literals.go",
|
|
"+++ b/imaginary-literals.go",
|
|
"@@ -1,5 +0,0 @@",
|
|
"-package main",
|
|
"-",
|
|
"-func main() {",
|
|
"-",
|
|
"-}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "856d716acddaf6e7e91667c5627f39bc32477b7c..82995a356477b94c28f13f84e7c705e71bb610b2"
|
|
}]
|