1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 07:55:12 +03:00
semantic/test/corpus/diff-summaries/javascript/switch-statement.json
Rob Rix 483e8a3f00 Regenerate all the things!
JavaScript: method call → function call.

Go: regenerated everything.
2017-01-24 15:09:28 -05:00

402 lines
13 KiB
JSON

[{
"testCaseDescription": "javascript-switch-statement-insert-test",
"expectedResult": {
"changes": {
"switch-statement.js": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
48
]
}
},
"summary": "Added the '1' switch statement"
}
]
},
"errors": {}
},
"filePaths": [
"switch-statement.js"
],
"patch": [
"diff --git a/switch-statement.js b/switch-statement.js",
"index e69de29b..5481c49f 100644",
"--- a/switch-statement.js",
"+++ b/switch-statement.js",
"@@ -0,0 +1 @@",
"+switch (1) { case 1: 1; case 2: 1; case 3: 3; };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "20109cf62d65353fadfe9965edbf1f9e875db9c4..41b828f4af89e6677a4997fe9d4b9cc8ad5a8268"
}
,{
"testCaseDescription": "javascript-switch-statement-replacement-insert-test",
"expectedResult": {
"changes": {
"switch-statement.js": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
48
]
}
},
"summary": "Added the '2' switch statement"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
48
]
}
},
"summary": "Added the '1' switch statement"
}
]
},
"errors": {}
},
"filePaths": [
"switch-statement.js"
],
"patch": [
"diff --git a/switch-statement.js b/switch-statement.js",
"index 5481c49f..ffd4a32a 100644",
"--- a/switch-statement.js",
"+++ b/switch-statement.js",
"@@ -1 +1,3 @@",
"+switch (2) { case 1: 1; case 2: 2; case 3: 3; };",
"+switch (1) { case 1: 1; case 2: 1; case 3: 3; };",
" switch (1) { case 1: 1; case 2: 1; case 3: 3; };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "41b828f4af89e6677a4997fe9d4b9cc8ad5a8268..b21a69cfb5bddfed6b44656554b88ba169752dcf"
}
,{
"testCaseDescription": "javascript-switch-statement-delete-insert-test",
"expectedResult": {
"changes": {
"switch-statement.js": [
{
"span": {
"replace": [
{
"start": [
1,
9
],
"end": [
1,
10
]
},
{
"start": [
1,
9
],
"end": [
1,
10
]
}
]
},
"summary": "Replaced '2' with '1' in the '1' switch statement"
},
{
"span": {
"replace": [
{
"start": [
1,
33
],
"end": [
1,
34
]
},
{
"start": [
1,
33
],
"end": [
1,
34
]
}
]
},
"summary": "Replaced '2' with '1' in the '1' switch statement"
}
]
},
"errors": {}
},
"filePaths": [
"switch-statement.js"
],
"patch": [
"diff --git a/switch-statement.js b/switch-statement.js",
"index ffd4a32a..302fb8bc 100644",
"--- a/switch-statement.js",
"+++ b/switch-statement.js",
"@@ -1,3 +1,3 @@",
"-switch (2) { case 1: 1; case 2: 2; case 3: 3; };",
"+switch (1) { case 1: 1; case 2: 1; case 3: 3; };",
" switch (1) { case 1: 1; case 2: 1; case 3: 3; };",
" switch (1) { case 1: 1; case 2: 1; case 3: 3; };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "b21a69cfb5bddfed6b44656554b88ba169752dcf..7c2c88ac6ae82fe4371fefaeaf5f839395d35fa4"
}
,{
"testCaseDescription": "javascript-switch-statement-replacement-test",
"expectedResult": {
"changes": {
"switch-statement.js": [
{
"span": {
"replace": [
{
"start": [
1,
9
],
"end": [
1,
10
]
},
{
"start": [
1,
9
],
"end": [
1,
10
]
}
]
},
"summary": "Replaced '1' with '2' in the '2' switch statement"
},
{
"span": {
"replace": [
{
"start": [
1,
33
],
"end": [
1,
34
]
},
{
"start": [
1,
33
],
"end": [
1,
34
]
}
]
},
"summary": "Replaced '1' with '2' in the '2' switch statement"
}
]
},
"errors": {}
},
"filePaths": [
"switch-statement.js"
],
"patch": [
"diff --git a/switch-statement.js b/switch-statement.js",
"index 302fb8bc..ffd4a32a 100644",
"--- a/switch-statement.js",
"+++ b/switch-statement.js",
"@@ -1,3 +1,3 @@",
"-switch (1) { case 1: 1; case 2: 1; case 3: 3; };",
"+switch (2) { case 1: 1; case 2: 2; case 3: 3; };",
" switch (1) { case 1: 1; case 2: 1; case 3: 3; };",
" switch (1) { case 1: 1; case 2: 1; case 3: 3; };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "7c2c88ac6ae82fe4371fefaeaf5f839395d35fa4..8c80e040d635672848180ef8fe6acefbf8c93fbc"
}
,{
"testCaseDescription": "javascript-switch-statement-delete-replacement-test",
"expectedResult": {
"changes": {
"switch-statement.js": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
48
]
}
},
"summary": "Deleted the '2' switch statement"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
48
]
}
},
"summary": "Deleted the '1' switch statement"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
48
]
}
},
"summary": "Added the '2' switch statement"
}
]
},
"errors": {}
},
"filePaths": [
"switch-statement.js"
],
"patch": [
"diff --git a/switch-statement.js b/switch-statement.js",
"index ffd4a32a..9b605791 100644",
"--- a/switch-statement.js",
"+++ b/switch-statement.js",
"@@ -1,3 +1,2 @@",
"-switch (2) { case 1: 1; case 2: 2; case 3: 3; };",
"-switch (1) { case 1: 1; case 2: 1; case 3: 3; };",
" switch (1) { case 1: 1; case 2: 1; case 3: 3; };",
"+switch (2) { case 1: 1; case 2: 2; case 3: 3; };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "8c80e040d635672848180ef8fe6acefbf8c93fbc..bd3aa8f2fcea05110e0b7efb3d7662b3de7bf631"
}
,{
"testCaseDescription": "javascript-switch-statement-delete-test",
"expectedResult": {
"changes": {
"switch-statement.js": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
48
]
}
},
"summary": "Deleted the '1' switch statement"
}
]
},
"errors": {}
},
"filePaths": [
"switch-statement.js"
],
"patch": [
"diff --git a/switch-statement.js b/switch-statement.js",
"index 9b605791..374091f2 100644",
"--- a/switch-statement.js",
"+++ b/switch-statement.js",
"@@ -1,2 +1 @@",
"-switch (1) { case 1: 1; case 2: 1; case 3: 3; };",
" switch (2) { case 1: 1; case 2: 2; case 3: 3; };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "bd3aa8f2fcea05110e0b7efb3d7662b3de7bf631..70d56762d3e6f27e10409d458adfa25226b79a99"
}
,{
"testCaseDescription": "javascript-switch-statement-delete-rest-test",
"expectedResult": {
"changes": {
"switch-statement.js": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
48
]
}
},
"summary": "Deleted the '2' switch statement"
}
]
},
"errors": {}
},
"filePaths": [
"switch-statement.js"
],
"patch": [
"diff --git a/switch-statement.js b/switch-statement.js",
"index 374091f2..e69de29b 100644",
"--- a/switch-statement.js",
"+++ b/switch-statement.js",
"@@ -1 +0,0 @@",
"-switch (2) { case 1: 1; case 2: 2; case 3: 3; };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "70d56762d3e6f27e10409d458adfa25226b79a99..20c612d09dbfc0c2c4ab61b7c9234d17faa3f43e"
}]