1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 00:12:29 +03:00
semantic/test/corpus/diff-summaries/ruby/element-reference.json
2016-11-02 10:52:40 -07:00

605 lines
19 KiB
JSON

[{
"testCaseDescription": "ruby-element-reference-insert-test",
"expectedResult": {
"changes": {
"element-reference.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
9
]
}
},
"summary": "Added the 'foo[bar]' subscript access"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
10
]
}
},
"summary": "Added the 'foo[:bar]' subscript access"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
13
]
}
},
"summary": "Added the 'foo[bar]' assignment"
}
]
},
"errors": {}
},
"filePaths": [
"element-reference.rb"
],
"sha1": "b22ab90f31f999ae10698ac13fb7826d9c012afd",
"gitDir": "test/corpus/repos/ruby",
"sha2": "8faa1072f000860b6f9134f201ee67bdf25fb175"
}
,{
"testCaseDescription": "ruby-element-reference-replacement-insert-test",
"expectedResult": {
"changes": {
"element-reference.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
7
]
}
},
"summary": "Added the 'x[\"b\"]' subscript access"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
8
]
}
},
"summary": "Added the 'x[:\"c\"]' subscript access"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
9
]
}
},
"summary": "Added the 'foo[bar]' subscript access"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
10
]
}
},
"summary": "Added the 'foo[:bar]' subscript access"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
5,
13
]
}
},
"summary": "Added the 'foo[bar]' assignment"
}
]
},
"errors": {}
},
"filePaths": [
"element-reference.rb"
],
"sha1": "8faa1072f000860b6f9134f201ee67bdf25fb175",
"gitDir": "test/corpus/repos/ruby",
"sha2": "1bf14bd0d1532dc8c6d9605c435d4dfa20e270a9"
}
,{
"testCaseDescription": "ruby-element-reference-delete-insert-test",
"expectedResult": {
"changes": {
"element-reference.rb": [
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
7
]
},
{
"start": [
1,
1
],
"end": [
1,
9
]
}
]
},
"summary": "Replaced the 'x[\"b\"]' subscript access with the 'foo[bar]' subscript access"
},
{
"span": {
"replace": [
{
"start": [
2,
1
],
"end": [
2,
2
]
},
{
"start": [
2,
1
],
"end": [
2,
4
]
}
]
},
"summary": "Replaced the 'x' identifier with the 'foo' identifier in the subscript access"
},
{
"span": {
"replace": [
{
"start": [
2,
3
],
"end": [
2,
7
]
},
{
"start": [
2,
5
],
"end": [
2,
9
]
}
]
},
"summary": "Replaced the ':\"c\"' symbol with the ':bar' symbol in the subscript access"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
3,
13
]
}
},
"summary": "Added the 'foo[bar]' assignment"
}
]
},
"errors": {}
},
"filePaths": [
"element-reference.rb"
],
"sha1": "1bf14bd0d1532dc8c6d9605c435d4dfa20e270a9",
"gitDir": "test/corpus/repos/ruby",
"sha2": "cc059ac892929e51191251d0f3e2252968d65314"
}
,{
"testCaseDescription": "ruby-element-reference-replacement-test",
"expectedResult": {
"changes": {
"element-reference.rb": [
{
"span": {
"replace": [
{
"start": [
1,
1
],
"end": [
1,
9
]
},
{
"start": [
1,
1
],
"end": [
1,
7
]
}
]
},
"summary": "Replaced the 'foo[bar]' subscript access with the 'x[\"b\"]' subscript access"
},
{
"span": {
"replace": [
{
"start": [
2,
1
],
"end": [
2,
4
]
},
{
"start": [
2,
1
],
"end": [
2,
2
]
}
]
},
"summary": "Replaced the 'foo' identifier with the 'x' identifier in the subscript access"
},
{
"span": {
"replace": [
{
"start": [
2,
5
],
"end": [
2,
9
]
},
{
"start": [
2,
3
],
"end": [
2,
7
]
}
]
},
"summary": "Replaced the ':bar' symbol with the ':\"c\"' symbol in the subscript access"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
3,
13
]
}
},
"summary": "Deleted the 'foo[bar]' assignment"
}
]
},
"errors": {}
},
"filePaths": [
"element-reference.rb"
],
"sha1": "cc059ac892929e51191251d0f3e2252968d65314",
"gitDir": "test/corpus/repos/ruby",
"sha2": "27d2733604b6d27e2f31de7267d31917451ecc53"
}
,{
"testCaseDescription": "ruby-element-reference-delete-replacement-test",
"expectedResult": {
"changes": {
"element-reference.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
7
]
}
},
"summary": "Deleted the 'x[\"b\"]' subscript access"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
8
]
}
},
"summary": "Deleted the 'x[:\"c\"]' subscript access"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
3,
9
]
}
},
"summary": "Deleted the 'foo[bar]' subscript access"
},
{
"span": {
"delete": {
"start": [
4,
1
],
"end": [
4,
10
]
}
},
"summary": "Deleted the 'foo[:bar]' subscript access"
},
{
"span": {
"delete": {
"start": [
5,
1
],
"end": [
5,
13
]
}
},
"summary": "Deleted the 'foo[bar]' assignment"
},
{
"span": {
"insert": {
"start": [
4,
1
],
"end": [
4,
7
]
}
},
"summary": "Added the 'x[\"b\"]' subscript access"
},
{
"span": {
"insert": {
"start": [
5,
1
],
"end": [
5,
8
]
}
},
"summary": "Added the 'x[:\"c\"]' subscript access"
}
]
},
"errors": {}
},
"filePaths": [
"element-reference.rb"
],
"sha1": "27d2733604b6d27e2f31de7267d31917451ecc53",
"gitDir": "test/corpus/repos/ruby",
"sha2": "868c4831dd01c807b763cea902b90a80a92c0a52"
}
,{
"testCaseDescription": "ruby-element-reference-delete-test",
"expectedResult": {
"changes": {
"element-reference.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
9
]
}
},
"summary": "Deleted the 'foo[bar]' subscript access"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
10
]
}
},
"summary": "Deleted the 'foo[:bar]' subscript access"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
3,
13
]
}
},
"summary": "Deleted the 'foo[bar]' assignment"
}
]
},
"errors": {}
},
"filePaths": [
"element-reference.rb"
],
"sha1": "868c4831dd01c807b763cea902b90a80a92c0a52",
"gitDir": "test/corpus/repos/ruby",
"sha2": "90e6a62b62a28a4a454b164384143756f66e1662"
}
,{
"testCaseDescription": "ruby-element-reference-delete-rest-test",
"expectedResult": {
"changes": {
"element-reference.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
7
]
}
},
"summary": "Deleted the 'x[\"b\"]' subscript access"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
8
]
}
},
"summary": "Deleted the 'x[:\"c\"]' subscript access"
}
]
},
"errors": {}
},
"filePaths": [
"element-reference.rb"
],
"sha1": "90e6a62b62a28a4a454b164384143756f66e1662",
"gitDir": "test/corpus/repos/ruby",
"sha2": "ce1c0def9460d28b4eaef38a52d16af8d0d78a7a"
}]