mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
561 lines
17 KiB
JSON
561 lines
17 KiB
JSON
[{
|
|
"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"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"imaginary-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/imaginary-literals.go b/imaginary-literals.go",
|
|
"index e69de29..aca2d55 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": "73fbfe72ff0e945837a0165af96346bd4deeebaa..65e0f7746798a99d1554274fa58e780c6ad056c0"
|
|
}
|
|
,{
|
|
"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",
|
|
"+)",
|
|
"+const (",
|
|
"+a = 01i",
|
|
"+b = 1.e+100i",
|
|
"+)",
|
|
"+const (",
|
|
" a = 01i",
|
|
" b = 1.e+100i",
|
|
" )"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "65e0f7746798a99d1554274fa58e780c6ad056c0..1a81993a1313f50e0e53fb9389b00f2a754c0fa4"
|
|
}
|
|
,{
|
|
"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": "1a81993a1313f50e0e53fb9389b00f2a754c0fa4..8cd3a76f92e6d82ab37d861a9861244a8119a8ee"
|
|
}
|
|
,{
|
|
"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"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"imaginary-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/imaginary-literals.go b/imaginary-literals.go",
|
|
"index a7e36a5..6983988 100644",
|
|
"--- a/imaginary-literals.go",
|
|
"+++ b/imaginary-literals.go",
|
|
"@@ -1,6 +1,6 @@",
|
|
" const (",
|
|
"-a = 01i",
|
|
"-b = 1.e+100i",
|
|
"+a = 02i",
|
|
"+b = 1.e+103i",
|
|
" )",
|
|
" const (",
|
|
" a = 01i"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "8cd3a76f92e6d82ab37d861a9861244a8119a8ee..09d8057f697d332662218b1ff035de2b730af29d"
|
|
}
|
|
,{
|
|
"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"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"imaginary-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/imaginary-literals.go b/imaginary-literals.go",
|
|
"index 6983988..02cff8d 100644",
|
|
"--- a/imaginary-literals.go",
|
|
"+++ b/imaginary-literals.go",
|
|
"@@ -1,12 +1,8 @@",
|
|
" const (",
|
|
"-a = 02i",
|
|
"-b = 1.e+103i",
|
|
"-)",
|
|
"-const (",
|
|
" 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": "09d8057f697d332662218b1ff035de2b730af29d..4f998d014e1746d3a86e1fb6c1e0da18901ef31f"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-imaginary-literals-delete-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"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"imaginary-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/imaginary-literals.go b/imaginary-literals.go",
|
|
"index 02cff8d..6d8ec55 100644",
|
|
"--- a/imaginary-literals.go",
|
|
"+++ b/imaginary-literals.go",
|
|
"@@ -1,8 +1,4 @@",
|
|
" const (",
|
|
"-a = 01i",
|
|
"-b = 1.e+100i",
|
|
"-)",
|
|
"-const (",
|
|
" a = 02i",
|
|
" b = 1.e+103i",
|
|
" )"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "4f998d014e1746d3a86e1fb6c1e0da18901ef31f..7c37d7055e067cab75cdb98d9b039b99c495e336"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-imaginary-literals-delete-rest-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"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"imaginary-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/imaginary-literals.go b/imaginary-literals.go",
|
|
"index 6d8ec55..e69de29 100644",
|
|
"--- a/imaginary-literals.go",
|
|
"+++ b/imaginary-literals.go",
|
|
"@@ -1,4 +0,0 @@",
|
|
"-const (",
|
|
"-a = 02i",
|
|
"-b = 1.e+103i",
|
|
"-)"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "7c37d7055e067cab75cdb98d9b039b99c495e336..2828389e38e6f78ae77878c1564c254c2c06fe69"
|
|
}]
|