mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
348 lines
11 KiB
JSON
348 lines
11 KiB
JSON
[{
|
|
"testCaseDescription": "ruby-conditional-assignment-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"conditional-assignment.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' conditional assignment"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"conditional-assignment.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/conditional-assignment.rb b/conditional-assignment.rb",
|
|
"index e69de29..f8f538b 100644",
|
|
"--- a/conditional-assignment.rb",
|
|
"+++ b/conditional-assignment.rb",
|
|
"@@ -0,0 +1 @@",
|
|
"+x ||= 5"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "6564c9c8832540d910a4118a6130305613ef9772..737bffe1cb105e55eb30dcb5e66499a162216c4d"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-conditional-assignment-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"conditional-assignment.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' conditional assignment"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' conditional assignment"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"conditional-assignment.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/conditional-assignment.rb b/conditional-assignment.rb",
|
|
"index f8f538b..6c10ae5 100644",
|
|
"--- a/conditional-assignment.rb",
|
|
"+++ b/conditional-assignment.rb",
|
|
"@@ -1 +1,3 @@",
|
|
"+x &&= 7",
|
|
"+x ||= 5",
|
|
" x ||= 5"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "737bffe1cb105e55eb30dcb5e66499a162216c4d..b4680d4032610561ef31cbb0508bfc9573be0d0c"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-conditional-assignment-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"conditional-assignment.rb": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
7
|
|
],
|
|
"end": [
|
|
1,
|
|
8
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
7
|
|
],
|
|
"end": [
|
|
1,
|
|
8
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced '7' with '5'"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"conditional-assignment.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/conditional-assignment.rb b/conditional-assignment.rb",
|
|
"index 6c10ae5..a333810 100644",
|
|
"--- a/conditional-assignment.rb",
|
|
"+++ b/conditional-assignment.rb",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-x &&= 7",
|
|
"+x ||= 5",
|
|
" x ||= 5",
|
|
" x ||= 5"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "b4680d4032610561ef31cbb0508bfc9573be0d0c..cce1693dd4e7b6101f7cbcc9100b4c3276194fa2"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-conditional-assignment-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"conditional-assignment.rb": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
7
|
|
],
|
|
"end": [
|
|
1,
|
|
8
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
7
|
|
],
|
|
"end": [
|
|
1,
|
|
8
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced '5' with '7'"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"conditional-assignment.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/conditional-assignment.rb b/conditional-assignment.rb",
|
|
"index a333810..6c10ae5 100644",
|
|
"--- a/conditional-assignment.rb",
|
|
"+++ b/conditional-assignment.rb",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-x ||= 5",
|
|
"+x &&= 7",
|
|
" x ||= 5",
|
|
" x ||= 5"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "cce1693dd4e7b6101f7cbcc9100b4c3276194fa2..8bd810b4f976b9701ff7a0ceb9d018bfeac4780e"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-conditional-assignment-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"conditional-assignment.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' conditional assignment"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' conditional assignment"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' conditional assignment"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"conditional-assignment.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/conditional-assignment.rb b/conditional-assignment.rb",
|
|
"index 6c10ae5..a56ffee 100644",
|
|
"--- a/conditional-assignment.rb",
|
|
"+++ b/conditional-assignment.rb",
|
|
"@@ -1,3 +1,2 @@",
|
|
"-x &&= 7",
|
|
"-x ||= 5",
|
|
" x ||= 5",
|
|
"+x &&= 7"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "8bd810b4f976b9701ff7a0ceb9d018bfeac4780e..ddc2e0154b1f8cbb3c3e3800549d0c5126c7ff52"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-conditional-assignment-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"conditional-assignment.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' conditional assignment"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"conditional-assignment.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/conditional-assignment.rb b/conditional-assignment.rb",
|
|
"index a56ffee..1abca02 100644",
|
|
"--- a/conditional-assignment.rb",
|
|
"+++ b/conditional-assignment.rb",
|
|
"@@ -1,2 +1 @@",
|
|
"-x ||= 5",
|
|
" x &&= 7"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "ddc2e0154b1f8cbb3c3e3800549d0c5126c7ff52..4f41d6075e03521d205fb38e22fe31e8f89ffcd9"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-conditional-assignment-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"conditional-assignment.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
8
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' conditional assignment"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"conditional-assignment.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/conditional-assignment.rb b/conditional-assignment.rb",
|
|
"index 1abca02..e69de29 100644",
|
|
"--- a/conditional-assignment.rb",
|
|
"+++ b/conditional-assignment.rb",
|
|
"@@ -1 +0,0 @@",
|
|
"-x &&= 7"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "4f41d6075e03521d205fb38e22fe31e8f89ffcd9..78a9116b77a62e27008d72a5a1f2b1b9bec795bd"
|
|
}]
|