1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 23:42:31 +03:00
semantic/test/corpus/diff-summaries/ruby/hash.json
2017-01-25 20:27:46 -05:00

495 lines
16 KiB
JSON

[{
"testCaseDescription": "ruby-hash-insert-test",
"expectedResult": {
"changes": {
"hash.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
71
]
}
},
"summary": "Added the '{ :key1 => \"value\", :key2 => 1, \"key3\": false, :\"symbol_key\" => 10 }' object"
}
]
},
"errors": {}
},
"filePaths": [
"hash.rb"
],
"patch": [
"diff --git a/hash.rb b/hash.rb",
"index e69de29..925618f 100644",
"--- a/hash.rb",
"+++ b/hash.rb",
"@@ -0,0 +1 @@",
"+{ :key1 => \"value\", :key2 => 1, \"key3\" => false, :\"symbol_key\" => 10 }"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "28aa7f167c9cd13555c78c78ce2484539360f682..fb1de565e2cc778cb231a73924db4a9920addbbb"
}
,{
"testCaseDescription": "ruby-hash-replacement-insert-test",
"expectedResult": {
"changes": {
"hash.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
47
]
}
},
"summary": "Added the '{ key1: \"changed value\", key2: 2, key3: true }' object"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
71
]
}
},
"summary": "Added the '{ :key1 => \"value\", :key2 => 1, \"key3\": false, :\"symbol_key\" => 10 }' object"
}
]
},
"errors": {}
},
"filePaths": [
"hash.rb"
],
"patch": [
"diff --git a/hash.rb b/hash.rb",
"index 925618f..a0c7d41 100644",
"--- a/hash.rb",
"+++ b/hash.rb",
"@@ -1 +1,3 @@",
"+{ key1: \"changed value\", key2: 2, key3: true }",
"+{ :key1 => \"value\", :key2 => 1, \"key3\" => false, :\"symbol_key\" => 10 }",
" { :key1 => \"value\", :key2 => 1, \"key3\" => false, :\"symbol_key\" => 10 }"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "fb1de565e2cc778cb231a73924db4a9920addbbb..98408920d932ab23e26ffb5b2b708256ffb8315a"
}
,{
"testCaseDescription": "ruby-hash-delete-insert-test",
"expectedResult": {
"changes": {
"hash.rb": [
{
"span": {
"replace": [
{
"start": [
1,
3
],
"end": [
1,
24
]
},
{
"start": [
1,
3
],
"end": [
1,
19
]
}
]
},
"summary": "Replaced the 'key1: \"changed value\"' pair with the ':key1 => \"value\"' pair"
},
{
"span": {
"insert": {
"start": [
1,
21
],
"end": [
1,
31
]
}
},
"summary": "Added the ':key2 => 1' pair"
},
{
"span": {
"insert": {
"start": [
1,
33
],
"end": [
1,
48
]
}
},
"summary": "Added the '\"key3\": false' pair"
},
{
"span": {
"insert": {
"start": [
1,
50
],
"end": [
1,
69
]
}
},
"summary": "Added the ':\"symbol_key\" => 10' pair"
},
{
"span": {
"delete": {
"start": [
1,
26
],
"end": [
1,
33
]
}
},
"summary": "Deleted the 'key2: 2' pair"
},
{
"span": {
"delete": {
"start": [
1,
35
],
"end": [
1,
45
]
}
},
"summary": "Deleted the 'key3: true' pair"
}
]
},
"errors": {}
},
"filePaths": [
"hash.rb"
],
"patch": [
"diff --git a/hash.rb b/hash.rb",
"index a0c7d41..d4ed2ec 100644",
"--- a/hash.rb",
"+++ b/hash.rb",
"@@ -1,3 +1,3 @@",
"-{ key1: \"changed value\", key2: 2, key3: true }",
"+{ :key1 => \"value\", :key2 => 1, \"key3\" => false, :\"symbol_key\" => 10 }",
" { :key1 => \"value\", :key2 => 1, \"key3\" => false, :\"symbol_key\" => 10 }",
" { :key1 => \"value\", :key2 => 1, \"key3\" => false, :\"symbol_key\" => 10 }"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "98408920d932ab23e26ffb5b2b708256ffb8315a..d811903585a5b32ff4e439adeac6aad06493b819"
}
,{
"testCaseDescription": "ruby-hash-replacement-test",
"expectedResult": {
"changes": {
"hash.rb": [
{
"span": {
"replace": [
{
"start": [
1,
3
],
"end": [
1,
19
]
},
{
"start": [
1,
3
],
"end": [
1,
24
]
}
]
},
"summary": "Replaced the ':key1 => \"value\"' pair with the 'key1: \"changed value\"' pair"
},
{
"span": {
"insert": {
"start": [
1,
26
],
"end": [
1,
33
]
}
},
"summary": "Added the 'key2: 2' pair"
},
{
"span": {
"replace": [
{
"start": [
1,
21
],
"end": [
1,
31
]
},
{
"start": [
1,
35
],
"end": [
1,
45
]
}
]
},
"summary": "Replaced the ':key2 => 1' pair with the 'key3: true' pair"
},
{
"span": {
"delete": {
"start": [
1,
33
],
"end": [
1,
48
]
}
},
"summary": "Deleted the '\"key3\": false' pair"
},
{
"span": {
"delete": {
"start": [
1,
50
],
"end": [
1,
69
]
}
},
"summary": "Deleted the ':\"symbol_key\" => 10' pair"
}
]
},
"errors": {}
},
"filePaths": [
"hash.rb"
],
"patch": [
"diff --git a/hash.rb b/hash.rb",
"index d4ed2ec..a0c7d41 100644",
"--- a/hash.rb",
"+++ b/hash.rb",
"@@ -1,3 +1,3 @@",
"-{ :key1 => \"value\", :key2 => 1, \"key3\" => false, :\"symbol_key\" => 10 }",
"+{ key1: \"changed value\", key2: 2, key3: true }",
" { :key1 => \"value\", :key2 => 1, \"key3\" => false, :\"symbol_key\" => 10 }",
" { :key1 => \"value\", :key2 => 1, \"key3\" => false, :\"symbol_key\" => 10 }"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "d811903585a5b32ff4e439adeac6aad06493b819..401c4211b7bc33a4a8faf012dd53dc46537afbda"
}
,{
"testCaseDescription": "ruby-hash-delete-replacement-test",
"expectedResult": {
"changes": {
"hash.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
47
]
}
},
"summary": "Deleted the '{ key1: \"changed value\", key2: 2, key3: true }' object"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
71
]
}
},
"summary": "Deleted the '{ :key1 => \"value\", :key2 => 1, \"key3\": false, :\"symbol_key\" => 10 }' object"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
47
]
}
},
"summary": "Added the '{ key1: \"changed value\", key2: 2, key3: true }' object"
}
]
},
"errors": {}
},
"filePaths": [
"hash.rb"
],
"patch": [
"diff --git a/hash.rb b/hash.rb",
"index a0c7d41..4154b7d 100644",
"--- a/hash.rb",
"+++ b/hash.rb",
"@@ -1,3 +1,2 @@",
"-{ key1: \"changed value\", key2: 2, key3: true }",
"-{ :key1 => \"value\", :key2 => 1, \"key3\" => false, :\"symbol_key\" => 10 }",
" { :key1 => \"value\", :key2 => 1, \"key3\" => false, :\"symbol_key\" => 10 }",
"+{ key1: \"changed value\", key2: 2, key3: true }"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "401c4211b7bc33a4a8faf012dd53dc46537afbda..56a51631438c4138df33af83893f40b489e959d4"
}
,{
"testCaseDescription": "ruby-hash-delete-test",
"expectedResult": {
"changes": {
"hash.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
71
]
}
},
"summary": "Deleted the '{ :key1 => \"value\", :key2 => 1, \"key3\": false, :\"symbol_key\" => 10 }' object"
}
]
},
"errors": {}
},
"filePaths": [
"hash.rb"
],
"patch": [
"diff --git a/hash.rb b/hash.rb",
"index 4154b7d..4a0e8d0 100644",
"--- a/hash.rb",
"+++ b/hash.rb",
"@@ -1,2 +1 @@",
"-{ :key1 => \"value\", :key2 => 1, \"key3\" => false, :\"symbol_key\" => 10 }",
" { key1: \"changed value\", key2: 2, key3: true }"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "56a51631438c4138df33af83893f40b489e959d4..7eb0c4a41815eb77d7622b942efd4ba10418eb2b"
}
,{
"testCaseDescription": "ruby-hash-delete-rest-test",
"expectedResult": {
"changes": {
"hash.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
47
]
}
},
"summary": "Deleted the '{ key1: \"changed value\", key2: 2, key3: true }' object"
}
]
},
"errors": {}
},
"filePaths": [
"hash.rb"
],
"patch": [
"diff --git a/hash.rb b/hash.rb",
"index 4a0e8d0..e69de29 100644",
"--- a/hash.rb",
"+++ b/hash.rb",
"@@ -1 +0,0 @@",
"-{ key1: \"changed value\", key2: 2, key3: true }"
],
"gitDir": "test/corpus/repos/ruby",
"shas": "7eb0c4a41815eb77d7622b942efd4ba10418eb2b..502a790cb75c5cd2f5a1166305c358bca7535c16"
}]