From 50974e5f602772a2b80dacf107d6b44a33cc79f4 Mon Sep 17 00:00:00 2001 From: Freddie Ridell Date: Mon, 16 Mar 2026 18:03:39 +0000 Subject: [PATCH] Add JavaScript condition-else mutation test corpus --- .../javascript/condition-else/1bbb9da263e9.js | 3 ++ .../condition-else/1bbb9da263e9.mutation.json | 34 +++++++++++++++++++ .../javascript/condition-else/afba60ee0e15.js | 5 +++ .../condition-else/afba60ee0e15.mutation.json | 34 +++++++++++++++++++ .../javascript/condition-else/b288b037816b.js | 5 +++ .../condition-else/b288b037816b.mutation.json | 34 +++++++++++++++++++ corpus/javascript/condition-else/base.js | 5 +++ .../javascript/condition-else/f82c43143668.js | 3 ++ .../condition-else/f82c43143668.mutation.json | 34 +++++++++++++++++++ 9 files changed, 157 insertions(+) create mode 100644 corpus/javascript/condition-else/1bbb9da263e9.js create mode 100644 corpus/javascript/condition-else/1bbb9da263e9.mutation.json create mode 100644 corpus/javascript/condition-else/afba60ee0e15.js create mode 100644 corpus/javascript/condition-else/afba60ee0e15.mutation.json create mode 100644 corpus/javascript/condition-else/b288b037816b.js create mode 100644 corpus/javascript/condition-else/b288b037816b.mutation.json create mode 100644 corpus/javascript/condition-else/base.js create mode 100644 corpus/javascript/condition-else/f82c43143668.js create mode 100644 corpus/javascript/condition-else/f82c43143668.mutation.json diff --git a/corpus/javascript/condition-else/1bbb9da263e9.js b/corpus/javascript/condition-else/1bbb9da263e9.js new file mode 100644 index 00000000..37b00182 --- /dev/null +++ b/corpus/javascript/condition-else/1bbb9da263e9.js @@ -0,0 +1,3 @@ +if (x) { + y(); +} else {} diff --git a/corpus/javascript/condition-else/1bbb9da263e9.mutation.json b/corpus/javascript/condition-else/1bbb9da263e9.mutation.json new file mode 100644 index 00000000..d9c3e7e3 --- /dev/null +++ b/corpus/javascript/condition-else/1bbb9da263e9.mutation.json @@ -0,0 +1,34 @@ +{ + "mutant": { + "lang": "js", + "twig": [ + "src/a.js" + ], + "kind": "StatementBlock", + "subst_span": { + "start": { + "line": 2, + "col": 7, + "byte": 23 + }, + "end": { + "line": 4, + "col": 1, + "byte": 33 + } + }, + "effect_span": { + "start": { + "line": 2, + "col": 7, + "byte": 23 + }, + "end": { + "line": 4, + "col": 1, + "byte": 33 + } + } + }, + "subst": "{}" +} \ No newline at end of file diff --git a/corpus/javascript/condition-else/afba60ee0e15.js b/corpus/javascript/condition-else/afba60ee0e15.js new file mode 100644 index 00000000..6dc71648 --- /dev/null +++ b/corpus/javascript/condition-else/afba60ee0e15.js @@ -0,0 +1,5 @@ +if (true) { + y(); +} else { + z(); +} diff --git a/corpus/javascript/condition-else/afba60ee0e15.mutation.json b/corpus/javascript/condition-else/afba60ee0e15.mutation.json new file mode 100644 index 00000000..9df61573 --- /dev/null +++ b/corpus/javascript/condition-else/afba60ee0e15.mutation.json @@ -0,0 +1,34 @@ +{ + "mutant": { + "lang": "js", + "twig": [ + "src/a.js" + ], + "kind": "Condition", + "subst_span": { + "start": { + "line": 0, + "col": 4, + "byte": 4 + }, + "end": { + "line": 0, + "col": 5, + "byte": 5 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 0, + "byte": 0 + }, + "end": { + "line": 4, + "col": 1, + "byte": 33 + } + } + }, + "subst": "true" +} \ No newline at end of file diff --git a/corpus/javascript/condition-else/b288b037816b.js b/corpus/javascript/condition-else/b288b037816b.js new file mode 100644 index 00000000..2a05ddf7 --- /dev/null +++ b/corpus/javascript/condition-else/b288b037816b.js @@ -0,0 +1,5 @@ +if (false) { + y(); +} else { + z(); +} diff --git a/corpus/javascript/condition-else/b288b037816b.mutation.json b/corpus/javascript/condition-else/b288b037816b.mutation.json new file mode 100644 index 00000000..234f3dba --- /dev/null +++ b/corpus/javascript/condition-else/b288b037816b.mutation.json @@ -0,0 +1,34 @@ +{ + "mutant": { + "lang": "js", + "twig": [ + "src/a.js" + ], + "kind": "Condition", + "subst_span": { + "start": { + "line": 0, + "col": 4, + "byte": 4 + }, + "end": { + "line": 0, + "col": 5, + "byte": 5 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 0, + "byte": 0 + }, + "end": { + "line": 4, + "col": 1, + "byte": 33 + } + } + }, + "subst": "false" +} \ No newline at end of file diff --git a/corpus/javascript/condition-else/base.js b/corpus/javascript/condition-else/base.js new file mode 100644 index 00000000..3f551022 --- /dev/null +++ b/corpus/javascript/condition-else/base.js @@ -0,0 +1,5 @@ +if (x) { + y(); +} else { + z(); +} diff --git a/corpus/javascript/condition-else/f82c43143668.js b/corpus/javascript/condition-else/f82c43143668.js new file mode 100644 index 00000000..dbde351f --- /dev/null +++ b/corpus/javascript/condition-else/f82c43143668.js @@ -0,0 +1,3 @@ +if (x) {} else { + z(); +} diff --git a/corpus/javascript/condition-else/f82c43143668.mutation.json b/corpus/javascript/condition-else/f82c43143668.mutation.json new file mode 100644 index 00000000..3751a96d --- /dev/null +++ b/corpus/javascript/condition-else/f82c43143668.mutation.json @@ -0,0 +1,34 @@ +{ + "mutant": { + "lang": "js", + "twig": [ + "src/a.js" + ], + "kind": "StatementBlock", + "subst_span": { + "start": { + "line": 0, + "col": 7, + "byte": 7 + }, + "end": { + "line": 2, + "col": 1, + "byte": 17 + } + }, + "effect_span": { + "start": { + "line": 0, + "col": 7, + "byte": 7 + }, + "end": { + "line": 2, + "col": 1, + "byte": 17 + } + } + }, + "subst": "{}" +} \ No newline at end of file -- knotmirror 0.0.1