mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
245 lines
6.8 KiB
JSON
245 lines
6.8 KiB
JSON
[{
|
|
"testCaseDescription": "go-rune-literals-setup-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"rune-literals.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"rune-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/rune-literals.go b/rune-literals.go",
|
|
"index e69de29..c9ecbf5 100644",
|
|
"--- a/rune-literals.go",
|
|
"+++ b/rune-literals.go",
|
|
"@@ -0,0 +1,2 @@",
|
|
"+package main",
|
|
"+"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "698831e39c8b5234f5732c0d3ff68044b958fe79..521c3259ae7adfea95d563a788f62a79e4574d45"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-rune-literals-insert-test",
|
|
"expectedResult": {
|
|
"changes": {},
|
|
"errors": {
|
|
"rune-literals.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
10,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added 'const (\na = '0'\nb = '\\''\nc = '\\'\nc = '\n'\nc = '\\u0000'\nc = '\\U01234567'\n)' at line 2, column 1 - line 10, column 2 in the main module"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"filePaths": [
|
|
"rune-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/rune-literals.go b/rune-literals.go",
|
|
"index c9ecbf5..7ecf7d8 100644",
|
|
"--- a/rune-literals.go",
|
|
"+++ b/rune-literals.go",
|
|
"@@ -1,2 +1,10 @@",
|
|
" package main",
|
|
"-",
|
|
"+const (",
|
|
"+a = '0'",
|
|
"+b = '\\''",
|
|
"+c = '\\'",
|
|
"+c = '",
|
|
"+'",
|
|
"+c = '\\u0000'",
|
|
"+c = '\\U01234567'",
|
|
"+)"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "521c3259ae7adfea95d563a788f62a79e4574d45..edb1da6c72799884cc078b548d62c328c4e78c20"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-rune-literals-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"rune-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/rune-literals.go b/rune-literals.go",
|
|
"index 7ecf7d8..cee94e2 100644",
|
|
"--- a/rune-literals.go",
|
|
"+++ b/rune-literals.go",
|
|
"@@ -1,10 +1,10 @@",
|
|
" package main",
|
|
" const (",
|
|
"-a = '0'",
|
|
"-b = '\\''",
|
|
"+a = '1'",
|
|
"+b = '",
|
|
"+''",
|
|
"+c = '\\u0011'",
|
|
" c = '\\'",
|
|
"-c = '",
|
|
"-'",
|
|
"-c = '\\u0000'",
|
|
"-c = '\\U01234567'",
|
|
"+c = '\\u0022'",
|
|
"+c = '\\U01234568'",
|
|
" )"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "edb1da6c72799884cc078b548d62c328c4e78c20..b5b22f2fb4f575d2c8ea62a617147b4c922ca827"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-rune-literals-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"rune-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/rune-literals.go b/rune-literals.go",
|
|
"index cee94e2..7ecf7d8 100644",
|
|
"--- a/rune-literals.go",
|
|
"+++ b/rune-literals.go",
|
|
"@@ -1,10 +1,10 @@",
|
|
" package main",
|
|
" const (",
|
|
"-a = '1'",
|
|
"-b = '",
|
|
"-''",
|
|
"-c = '\\u0011'",
|
|
"+a = '0'",
|
|
"+b = '\\''",
|
|
" c = '\\'",
|
|
"-c = '\\u0022'",
|
|
"-c = '\\U01234568'",
|
|
"+c = '",
|
|
"+'",
|
|
"+c = '\\u0000'",
|
|
"+c = '\\U01234567'",
|
|
" )"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "b5b22f2fb4f575d2c8ea62a617147b4c922ca827..612f76f0f08f91fae6e57219d564a31bf2e0f1d2"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-rune-literals-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {},
|
|
"errors": {
|
|
"rune-literals.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
10,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted 'const (\na = '0'\nb = '\\''\nc = '\\'\nc = '\n'\nc = '\\u0000'\nc = '\\U01234567'\n)' at line 2, column 1 - line 10, column 2 in the main module"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"filePaths": [
|
|
"rune-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/rune-literals.go b/rune-literals.go",
|
|
"index 7ecf7d8..c9ecbf5 100644",
|
|
"--- a/rune-literals.go",
|
|
"+++ b/rune-literals.go",
|
|
"@@ -1,10 +1,2 @@",
|
|
" package main",
|
|
"-const (",
|
|
"-a = '0'",
|
|
"-b = '\\''",
|
|
"-c = '\\'",
|
|
"-c = '",
|
|
"-'",
|
|
"-c = '\\u0000'",
|
|
"-c = '\\U01234567'",
|
|
"-)",
|
|
"+"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "612f76f0f08f91fae6e57219d564a31bf2e0f1d2..344d86c5203452a38c054cc76816802443d1511d"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-rune-literals-teardown-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"rune-literals.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"rune-literals.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/rune-literals.go b/rune-literals.go",
|
|
"index c9ecbf5..e69de29 100644",
|
|
"--- a/rune-literals.go",
|
|
"+++ b/rune-literals.go",
|
|
"@@ -1,2 +0,0 @@",
|
|
"-package main",
|
|
"-"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "344d86c5203452a38c054cc76816802443d1511d..c6e11cb46b1defca8bc21c168d5345d1bca754c0"
|
|
}]
|