mirror of
https://github.com/github/semantic.git
synced 2024-12-26 00:12:29 +03:00
348 lines
10 KiB
JSON
348 lines
10 KiB
JSON
[{
|
|
"testCaseDescription": "ruby-assignment-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"assignment.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' assignment"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"assignment.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/assignment.rb b/assignment.rb",
|
|
"index e69de29..3aea0c5 100644",
|
|
"--- a/assignment.rb",
|
|
"+++ b/assignment.rb",
|
|
"@@ -0,0 +1 @@",
|
|
"+x = 0"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "4d0ef41f7debeacebe9a218e39bb2b48c8405446..ad5a90e438df179af24b1db62954dd57456ecb70"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-assignment-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"assignment.rb": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' assignment"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' assignment"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"assignment.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/assignment.rb b/assignment.rb",
|
|
"index 3aea0c5..80ff640 100644",
|
|
"--- a/assignment.rb",
|
|
"+++ b/assignment.rb",
|
|
"@@ -1 +1,3 @@",
|
|
"+x = 1",
|
|
"+x = 0",
|
|
" x = 0"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "ad5a90e438df179af24b1db62954dd57456ecb70..91faac962a01a884edd6ada891ced7040d038ad4"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-assignment-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"assignment.rb": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
5
|
|
],
|
|
"end": [
|
|
1,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
5
|
|
],
|
|
"end": [
|
|
1,
|
|
6
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced '1' with '0' in an assignment to x"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"assignment.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/assignment.rb b/assignment.rb",
|
|
"index 80ff640..e9580bc 100644",
|
|
"--- a/assignment.rb",
|
|
"+++ b/assignment.rb",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-x = 1",
|
|
"+x = 0",
|
|
" x = 0",
|
|
" x = 0"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "91faac962a01a884edd6ada891ced7040d038ad4..9176406da7e16de7c17eddfbeb557a7441dcae6b"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-assignment-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"assignment.rb": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
5
|
|
],
|
|
"end": [
|
|
1,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
5
|
|
],
|
|
"end": [
|
|
1,
|
|
6
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced '0' with '1' in an assignment to x"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"assignment.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/assignment.rb b/assignment.rb",
|
|
"index e9580bc..80ff640 100644",
|
|
"--- a/assignment.rb",
|
|
"+++ b/assignment.rb",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-x = 0",
|
|
"+x = 1",
|
|
" x = 0",
|
|
" x = 0"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "9176406da7e16de7c17eddfbeb557a7441dcae6b..781f04eca397646ee7614b9206aa7eff79a2e400"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-assignment-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"assignment.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' assignment"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' assignment"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' assignment"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"assignment.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/assignment.rb b/assignment.rb",
|
|
"index 80ff640..2465cb3 100644",
|
|
"--- a/assignment.rb",
|
|
"+++ b/assignment.rb",
|
|
"@@ -1,3 +1,2 @@",
|
|
"-x = 1",
|
|
"-x = 0",
|
|
" x = 0",
|
|
"+x = 1"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "781f04eca397646ee7614b9206aa7eff79a2e400..75bccc3232c4b4773225c70ba35b08ba08e95d38"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-assignment-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"assignment.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' assignment"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"assignment.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/assignment.rb b/assignment.rb",
|
|
"index 2465cb3..7d4290a 100644",
|
|
"--- a/assignment.rb",
|
|
"+++ b/assignment.rb",
|
|
"@@ -1,2 +1 @@",
|
|
"-x = 0",
|
|
" x = 1"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "75bccc3232c4b4773225c70ba35b08ba08e95d38..5dd9958c7bc7d5736ba816f77ce0a88f7b2fa709"
|
|
}
|
|
,{
|
|
"testCaseDescription": "ruby-assignment-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"assignment.rb": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
6
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' assignment"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"assignment.rb"
|
|
],
|
|
"patch": [
|
|
"diff --git a/assignment.rb b/assignment.rb",
|
|
"index 7d4290a..e69de29 100644",
|
|
"--- a/assignment.rb",
|
|
"+++ b/assignment.rb",
|
|
"@@ -1 +0,0 @@",
|
|
"-x = 1"
|
|
],
|
|
"gitDir": "test/corpus/repos/ruby",
|
|
"shas": "5dd9958c7bc7d5736ba816f77ce0a88f7b2fa709..a07f2fef830bc79ffa2136025c4e29d5c8a0ff1b"
|
|
}]
|