1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 14:54:16 +03:00
semantic/test/corpus/diff-summaries/javascript/try-statement.json
2016-11-07 10:26:59 -08:00

402 lines
13 KiB
JSON

[{
"testCaseDescription": "javascript-try-statement-insert-test",
"expectedResult": {
"changes": {
"try-statement.js": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
39
]
}
},
"summary": "Added the '{ f; }' try statement"
}
]
},
"errors": {}
},
"filePaths": [
"try-statement.js"
],
"patch": [
"diff --git a/try-statement.js b/try-statement.js",
"index e69de29..9826f7c 100644",
"--- a/try-statement.js",
"+++ b/try-statement.js",
"@@ -0,0 +1 @@",
"+try { f; } catch { g; } finally { h; };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "a5583b5ba5ae300bddff029cb144c539a2cb48fd..d8b7dc1823e1a5b0909865b2d0d40a40f0185e59"
}
,{
"testCaseDescription": "javascript-try-statement-replacement-insert-test",
"expectedResult": {
"changes": {
"try-statement.js": [
{
"span": {
"insert": {
"start": [
1,
1
],
"end": [
1,
39
]
}
},
"summary": "Added the '{ f; }' try statement"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
39
]
}
},
"summary": "Added the '{ f; }' try statement"
}
]
},
"errors": {}
},
"filePaths": [
"try-statement.js"
],
"patch": [
"diff --git a/try-statement.js b/try-statement.js",
"index 9826f7c..7befc1c 100644",
"--- a/try-statement.js",
"+++ b/try-statement.js",
"@@ -1 +1,3 @@",
"+try { f; } catch { h; } finally { g; };",
"+try { f; } catch { g; } finally { h; };",
" try { f; } catch { g; } finally { h; };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "d8b7dc1823e1a5b0909865b2d0d40a40f0185e59..670f6360d76e32d78de98aae0552d153f8dc9a90"
}
,{
"testCaseDescription": "javascript-try-statement-delete-insert-test",
"expectedResult": {
"changes": {
"try-statement.js": [
{
"span": {
"replace": [
{
"start": [
1,
20
],
"end": [
1,
21
]
},
{
"start": [
1,
20
],
"end": [
1,
21
]
}
]
},
"summary": "Replaced the 'h' identifier with the 'g' identifier in the { f; } try statement"
},
{
"span": {
"replace": [
{
"start": [
1,
35
],
"end": [
1,
36
]
},
{
"start": [
1,
35
],
"end": [
1,
36
]
}
]
},
"summary": "Replaced the 'g' identifier with the 'h' identifier in the { f; } try statement"
}
]
},
"errors": {}
},
"filePaths": [
"try-statement.js"
],
"patch": [
"diff --git a/try-statement.js b/try-statement.js",
"index 7befc1c..94fed9c 100644",
"--- a/try-statement.js",
"+++ b/try-statement.js",
"@@ -1,3 +1,3 @@",
"-try { f; } catch { h; } finally { g; };",
"+try { f; } catch { g; } finally { h; };",
" try { f; } catch { g; } finally { h; };",
" try { f; } catch { g; } finally { h; };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "670f6360d76e32d78de98aae0552d153f8dc9a90..64175cdf26b3a3618ea930a705a043f895b3fd09"
}
,{
"testCaseDescription": "javascript-try-statement-replacement-test",
"expectedResult": {
"changes": {
"try-statement.js": [
{
"span": {
"replace": [
{
"start": [
1,
20
],
"end": [
1,
21
]
},
{
"start": [
1,
20
],
"end": [
1,
21
]
}
]
},
"summary": "Replaced the 'g' identifier with the 'h' identifier in the { f; } try statement"
},
{
"span": {
"replace": [
{
"start": [
1,
35
],
"end": [
1,
36
]
},
{
"start": [
1,
35
],
"end": [
1,
36
]
}
]
},
"summary": "Replaced the 'h' identifier with the 'g' identifier in the { f; } try statement"
}
]
},
"errors": {}
},
"filePaths": [
"try-statement.js"
],
"patch": [
"diff --git a/try-statement.js b/try-statement.js",
"index 94fed9c..7befc1c 100644",
"--- a/try-statement.js",
"+++ b/try-statement.js",
"@@ -1,3 +1,3 @@",
"-try { f; } catch { g; } finally { h; };",
"+try { f; } catch { h; } finally { g; };",
" try { f; } catch { g; } finally { h; };",
" try { f; } catch { g; } finally { h; };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "64175cdf26b3a3618ea930a705a043f895b3fd09..42c1509a343741e5dd1c1bfcb86fb8745b60824d"
}
,{
"testCaseDescription": "javascript-try-statement-delete-replacement-test",
"expectedResult": {
"changes": {
"try-statement.js": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
39
]
}
},
"summary": "Deleted the '{ f; }' try statement"
},
{
"span": {
"delete": {
"start": [
2,
1
],
"end": [
2,
39
]
}
},
"summary": "Deleted the '{ f; }' try statement"
},
{
"span": {
"insert": {
"start": [
2,
1
],
"end": [
2,
39
]
}
},
"summary": "Added the '{ f; }' try statement"
}
]
},
"errors": {}
},
"filePaths": [
"try-statement.js"
],
"patch": [
"diff --git a/try-statement.js b/try-statement.js",
"index 7befc1c..8ab70e0 100644",
"--- a/try-statement.js",
"+++ b/try-statement.js",
"@@ -1,3 +1,2 @@",
"-try { f; } catch { h; } finally { g; };",
"-try { f; } catch { g; } finally { h; };",
" try { f; } catch { g; } finally { h; };",
"+try { f; } catch { h; } finally { g; };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "42c1509a343741e5dd1c1bfcb86fb8745b60824d..400e89f91ea35a78dd70b46c3bc204c5aed26b7f"
}
,{
"testCaseDescription": "javascript-try-statement-delete-test",
"expectedResult": {
"changes": {
"try-statement.js": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
39
]
}
},
"summary": "Deleted the '{ f; }' try statement"
}
]
},
"errors": {}
},
"filePaths": [
"try-statement.js"
],
"patch": [
"diff --git a/try-statement.js b/try-statement.js",
"index 8ab70e0..024f88a 100644",
"--- a/try-statement.js",
"+++ b/try-statement.js",
"@@ -1,2 +1 @@",
"-try { f; } catch { g; } finally { h; };",
" try { f; } catch { h; } finally { g; };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "400e89f91ea35a78dd70b46c3bc204c5aed26b7f..f97dd13575c5a030192a9abd5e4992a51afc050f"
}
,{
"testCaseDescription": "javascript-try-statement-delete-rest-test",
"expectedResult": {
"changes": {
"try-statement.js": [
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
39
]
}
},
"summary": "Deleted the '{ f; }' try statement"
}
]
},
"errors": {}
},
"filePaths": [
"try-statement.js"
],
"patch": [
"diff --git a/try-statement.js b/try-statement.js",
"index 024f88a..e69de29 100644",
"--- a/try-statement.js",
"+++ b/try-statement.js",
"@@ -1 +0,0 @@",
"-try { f; } catch { h; } finally { g; };"
],
"gitDir": "test/corpus/repos/javascript",
"shas": "f97dd13575c5a030192a9abd5e4992a51afc050f..734bede3c6c3771f011aa729a417011d310ec5cc"
}]