1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 23:11:50 +03:00
semantic/test/corpus/diff-summaries/javascript/switch-statement.json

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 e69de29..5481c49 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": "8f7edd21ecef61769b82fb5a60a881f31ce30a01..9e6646e9f984497bc80a1c1f1afb86eb869c9b26"
}
,{
"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 5481c49..ffd4a32 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": "9e6646e9f984497bc80a1c1f1afb86eb869c9b26..887d9088c295dc7a59711a02769e0754c6d1fa33"
}
,{
"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 '2' case statement"
}
]
},
"errors": {}
},
"filePaths": [
"switch-statement.js"
],
"patch": [
"diff --git a/switch-statement.js b/switch-statement.js",
"index ffd4a32..302fb8b 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": "887d9088c295dc7a59711a02769e0754c6d1fa33..ba0bf7fe9de15a5f734f4e4c6059ce15c34e8311"
}
,{
"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' case statement"
}
]
},
"errors": {}
},
"filePaths": [
"switch-statement.js"
],
"patch": [
"diff --git a/switch-statement.js b/switch-statement.js",
"index 302fb8b..ffd4a32 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": "ba0bf7fe9de15a5f734f4e4c6059ce15c34e8311..213e3cb9828fdcbfe60dea518fb77b1896af15bb"
}
,{
"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 ffd4a32..9b60579 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": "213e3cb9828fdcbfe60dea518fb77b1896af15bb..a818910ed9354ea4b6070e11af8de9cefd66aedf"
}
,{
"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 9b60579..374091f 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": "a818910ed9354ea4b6070e11af8de9cefd66aedf..db5abd71dd4f34b20163d37657b839707b279e09"
}
,{
"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 374091f..e69de29 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": "db5abd71dd4f34b20163d37657b839707b279e09..8e3f45940f773e7849a53fefdaeb52a682a6a488"
}]