Skip to content

Commit 128bba1

Browse files
committed
add test cases for switch case
1 parent efda677 commit 128bba1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/switchcase.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
{ "commitID": "12345", "fileName": "test.js", "projectID": "saltlab/test", "sliceChangePair": [ { "after-ast": { "type": "Program", "body": [ { "type": "SwitchStatement", "discriminant": { "type": "Identifier", "name": "a" }, "cases": [ { "type": "SwitchCase", "test": { "type": "Literal", "value": 1, "raw": "1" }, "consequent": [ { "type": "TryStatement", "block": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": true, "raw": "true", "change": "INSERTED", "change-noprop": "INHERITED" }, "change": "INSERTED", "change-noprop": "INHERITED" } ], "change": "INSERTED", "change-noprop": "INHERITED" }, "handler": { "type": "CatchClause", "param": { "type": "Identifier", "name": "e", "change": "INSERTED", "change-noprop": "INHERITED" }, "body": { "type": "BlockStatement", "body": [], "change": "INSERTED", "change-noprop": "INHERITED" }, "change": "INSERTED", "change-noprop": "INHERITED" }, "finalizer": null, "change": "INSERTED", "change-noprop": "INSERTED" } ], "change": "UNCHANGED", "change-noprop": "UNCHANGED" } ], "change": "UNCHANGED", "change-noprop": "UNCHANGED" } ], "change": "UNCHANGED", "change-noprop": "UNCHANGED", "sourceType": "script" } , "before-ast": null, "labels": [ "MUTATION_CANDIDATE" ] } ], "sourceFileChangeID": 1, "url": "https://github.com/saltlab/test/commit/12345" }
2+
{ "commitID": "12345", "fileName": "test.js", "projectID": "saltlab/test", "sliceChangePair": [ { "after-ast": { "type": "Program", "body": [ { "type": "SwitchStatement", "discriminant": { "type": "Identifier", "name": "a" }, "cases": [ { "type": "SwitchCase", "test": { "type": "Literal", "value": 1, "raw": "1" }, "consequent": [ { "type": "TryStatement", "block": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": true, "raw": "true", "change": "INSERTED", "change-noprop": "INHERITED" }, "change": "INSERTED", "change-noprop": "INHERITED" } ], "change": "INSERTED", "change-noprop": "INHERITED" }, "handler": { "type": "CatchClause", "param": { "type": "Identifier", "name": "e", "change": "INSERTED", "change-noprop": "INHERITED" }, "body": { "type": "BlockStatement", "body": [], "change": "INSERTED", "change-noprop": "INHERITED" }, "change": "INSERTED", "change-noprop": "INHERITED" }, "finalizer": null, "change": "INSERTED", "change-noprop": "INHERITED" } ], "change": "INSERTED", "change-noprop": "INHERITED" } ], "change": "INSERTED", "change-noprop": "INSERTED" } ], "change": "UNCHANGED", "change-noprop": "UNCHANGED", "sourceType": "script" } , "before-ast": null, "labels": [ "MUTATION_CANDIDATE" ] } ], "sourceFileChangeID": 1, "url": "https://github.com/saltlab/test/commit/12345" }
3+
{ "commitID": "12345", "fileName": "test.js", "projectID": "saltlab/test", "sliceChangePair": [ { "after-ast": { "type": "Program", "body": [ { "type": "SwitchStatement", "discriminant": { "type": "Identifier", "name": "a" }, "cases": [ { "type": "SwitchCase", "test": { "type": "Literal", "value": 1, "raw": "1" }, "consequent": [ { "type": "TryStatement", "block": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": true, "raw": "true", "change": "INSERTED", "change-noprop": "INHERITED" }, "change": "INSERTED", "change-noprop": "INHERITED" }, { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": true, "raw": "true", "change": "INSERTED", "change-noprop": "INHERITED" }, "change": "INSERTED", "change-noprop": "INHERITED" } ], "change": "INSERTED", "change-noprop": "INHERITED" }, "handler": { "type": "CatchClause", "param": { "type": "Identifier", "name": "e", "change": "INSERTED", "change-noprop": "INHERITED" }, "body": { "type": "BlockStatement", "body": [], "change": "INSERTED", "change-noprop": "INHERITED" }, "change": "INSERTED", "change-noprop": "INHERITED" }, "finalizer": null, "change": "INSERTED", "change-noprop": "INSERTED" } ], "change": "UNCHANGED", "change-noprop": "UNCHANGED" } ], "change": "UNCHANGED", "change-noprop": "UNCHANGED" } ], "change": "UNCHANGED", "change-noprop": "UNCHANGED", "sourceType": "script" } , "before-ast": null, "labels": [ "MUTATION_CANDIDATE" ] } ], "sourceFileChangeID": 1, "url": "https://github.com/saltlab/test/commit/12345" }
4+
{ "commitID": "12345", "fileName": "test.js", "projectID": "saltlab/test", "sliceChangePair": [ { "after-ast": { "type": "Program", "body": [ { "type": "SwitchStatement", "discriminant": { "type": "Identifier", "name": "a" }, "cases": [ { "type": "SwitchCase", "test": { "type": "Literal", "value": 1, "raw": "1" }, "consequent": [ { "type": "TryStatement", "block": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": true, "raw": "true", "change": "INSERTED", "change-noprop": "INHERITED" }, "change": "INSERTED", "change-noprop": "INHERITED" }, { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": true, "raw": "true", "change": "INSERTED", "change-noprop": "INHERITED" }, "change": "INSERTED", "change-noprop": "INHERITED" } ], "change": "INSERTED", "change-noprop": "INHERITED" }, "handler": { "type": "CatchClause", "param": { "type": "Identifier", "name": "e", "change": "INSERTED", "change-noprop": "INHERITED" }, "body": { "type": "BlockStatement", "body": [], "change": "INSERTED", "change-noprop": "INHERITED" }, "change": "INSERTED", "change-noprop": "INHERITED" }, "finalizer": null, "change": "INSERTED", "change-noprop": "INHERITED" } ], "change": "INSERTED", "change-noprop": "INHERITED" } ], "change": "INSERTED", "change-noprop": "INSERTED" } ], "change": "UNCHANGED", "change-noprop": "UNCHANGED", "sourceType": "script" } , "before-ast": null, "labels": [ "MUTATION_CANDIDATE" ] } ], "sourceFileChangeID": 1, "url": "https://github.com/saltlab/test/commit/12345" }

0 commit comments

Comments
 (0)