1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 14:54:16 +03:00
semantic/test/corpus/diff-summaries/ruby/hash.json
2016-11-03 16:02:56 -07:00

492 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: …, :key2: …, \"key3\": …, :\"symbol_key\": … }' 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": "bcd6d0b339d47a3a232e595d43db61acf2bfae04..1618b6749dab1997b0e6606829f8594c205b0616"
}
,{
"testCaseDescription": "ruby-hash-replacement-insert-test",
"expectedResult": {
"changes": {
"hash.rb": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
47
]
}
},
"summary": "Added the '{ key1: …, key2: …, key3: … }' object"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
71
]
}
},
"summary": "Added the '{ :key1: …, :key2: …, \"key3\": …, :\"symbol_key\": … }' 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": "1618b6749dab1997b0e6606829f8594c205b0616..06de914a4e27ab3c14240b993c16ca75ea2a9f74"
}
,{
"testCaseDescription": "ruby-hash-delete-insert-test",
"expectedResult": {
"changes": {
"hash.rb": [
{
"span": {
"insert": {
"start": [
1,
3
],
"end": [
1,
19
]
}
},
"summary": "Added the ':key1: …' pair"
},
{
"span": {
"insert": {
"start": [
1,
21
],
"end": [
1,
31
]
}
},
"summary": "Added the ':key2: …' pair"
},
{
"span": {
"replace": [
{
"start": [
1,
3
],
"end": [
1,
24
]
},
{
"start": [
1,
33
],
"end": [
1,
48
]
}
]
},
"summary": "Replaced the 'key1: …' pair with the '\"key3\": …' pair"
},
{
"span": {
"replace": [
{
"start": [
1,
26
],
"end": [
1,
33
]
},
{
"start": [
1,
50
],
"end": [
1,
69
]
}
]
},
"summary": "Replaced the 'key2: …' pair with the ':\"symbol_key\": …' pair"
},
{
"span": {
"delete": {
"start": [
1,
35
],
"end": [
1,
45
]
}
},
"summary": "Deleted the 'key3: …' 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": "06de914a4e27ab3c14240b993c16ca75ea2a9f74..9b4b4ff04981427a62802545d093e8536fe6b273"
}
,{
"testCaseDescription": "ruby-hash-replacement-test",
"expectedResult": {
"changes": {
"hash.rb": [
{
"span": {
"insert": {
"start": [
1,
3
],
"end": [
1,
24
]
}
},
"summary": "Added the 'key1: …' pair"
},
{
"span": {
"replace": [
{
"start": [
1,
3
],
"end": [
1,
19
]
},
{
"start": [
1,
26
],
"end": [
1,
33
]
}
]
},
"summary": "Replaced the ':key1: …' pair with the 'key2: …' pair"
},
{
"span": {
"replace": [
{
"start": [
1,
21
],
"end": [
1,
31
]
},
{
"start": [
1,
35
],
"end": [
1,
45
]
}
]
},
"summary": "Replaced the ':key2: …' pair with the 'key3: …' pair"
},
{
"span": {
"delete": {
"start": [
1,
33
],
"end": [
1,
48
]
}
},
"summary": "Deleted the '\"key3\": …' pair"
},
{
"span": {
"delete": {
"start": [
1,
50
],
"end": [
1,
69
]
}
},
"summary": "Deleted the ':\"symbol_key\": …' 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": "9b4b4ff04981427a62802545d093e8536fe6b273..35db7ac0f6000c8534941e46f08790624d929444"
}
,{
"testCaseDescription": "ruby-hash-delete-replacement-test",
"expectedResult": {
"changes": {
"hash.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
47
]
}
},
"summary": "Deleted the '{ key1: …, key2: …, key3: … }' object"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
71
]
}
},
"summary": "Deleted the '{ :key1: …, :key2: …, \"key3\": …, :\"symbol_key\": … }' object"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
47
]
}
},
"summary": "Added the '{ key1: …, key2: …, key3: … }' 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": "35db7ac0f6000c8534941e46f08790624d929444..673381f3ce87fd2d1102e55ce01a719ac28ad4b1"
}
,{
"testCaseDescription": "ruby-hash-delete-test",
"expectedResult": {
"changes": {
"hash.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
71
]
}
},
"summary": "Deleted the '{ :key1: …, :key2: …, \"key3\": …, :\"symbol_key\": … }' 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": "673381f3ce87fd2d1102e55ce01a719ac28ad4b1..cba8ccf48ee9899a1c5ad781289fe52f129f48d4"
}
,{
"testCaseDescription": "ruby-hash-delete-rest-test",
"expectedResult": {
"changes": {
"hash.rb": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
47
]
}
},
"summary": "Deleted the '{ key1: …, key2: …, key3: … }' 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": "cba8ccf48ee9899a1c5ad781289fe52f129f48d4..5b279526f66afb77b2588f5173ce44d7cc693f97"
}]