Mutation test report

Current display: example/source.dart - back to top Detected Total Percentage
Date: 2024-03-24 17:47:31.491803 Mutations: 22 42 52.4 %
Builtin rules: true Blocked: 5 42 11.9 %

          Source code
       1 // Copyright 2021, domohuhn.
       2 // License: BSD-3-Clause
       3 // See LICENSE for the full text of the license
       4 
       5 int conditions(int a, int b, int c) {

Undetected mutations:
1 :+ if (a == b && (a < c || b > c && b == c)) { ||Id: builtin.or

2 :+ if (a == b && (a < c || b > c || b != c)) { ==Id: builtin.op.eq

3 :+ if (a == b && (a < c ||!( b > c )|| b == c)) { RegExp: pattern=\|([^|()]+?)\| flags=msId: builtin.logical.or_chain

4 :+ if (a == b && (a < c || b > c ||!( b == c))) { RegExp: pattern=([|&][|&])([^|&]*?)\) flags=mId: builtin.if.end
Detected mutations:
1 :+ if (a == b || (a < c || b > c || b == c)) { &&Id: builtin.and

2 :+ if (a == b && (a < c && b > c || b == c)) { ||Id: builtin.or

3 :+ if (a != b && (a < c || b > c || b == c)) { ==Id: builtin.op.eq

4 :+ if (!(a == b && (a < c || b > c || b == c))) { RegExp: pattern=[\s]if[\s]*\((.*?)\)[\s]*{ flags=msId: builtin.if

5 :+ if (!(a == b )&& (a < c || b > c || b == c)) { RegExp: pattern=if\s*\(([^|&\)]*?)([|&][|&]) flags=mId: builtin.if.start

6 :+ if (a == b &&!(a < c || b > c || b == c)) { RegExp: pattern=([|&][|&])[\s]*?\( flags=msId: builtin.logical.chain_not
Detected mutations:
1 :+ return a - c; RegExp: pattern=\+([^=]) flags=mId: builtin.arith.add
Undetected mutations:
1 :+ } else if (b <= 0 || c > 0) { &&Id: builtin.and

2 :+ } else if (b < 0 && c > 0) { <=Id: builtin.op.leq
Detected mutations:
1 :+ } else if (b == 0 && c > 0) { <=Id: builtin.op.leq

2 :+ } else if (!(b <= 0 && c > 0)) { RegExp: pattern=[\s]if[\s]*\((.*?)\)[\s]*{ flags=msId: builtin.if

3 :+ } else if (!(b <= 0 )&& c > 0) { RegExp: pattern=\(([^$(]*?)&&([^$()]*?)\) flags=mId: builtin.logical.and_chain2

4 :+ } else if (b <= 0 &&!( c > 0)) { RegExp: pattern=\(([^$(]*?)&&([^$()]*?)\) flags=mId: builtin.logical.and_chain2

5 :+ } else if (!(b <= 0 )&& c > 0) { RegExp: pattern=if\s*\(([^|&\)]*?)([|&][|&]) flags=mId: builtin.if.start

6 :+ } else if (b <= 0 &&!( c > 0)) { RegExp: pattern=([|&][|&])([^|&]*?)\) flags=mId: builtin.if.end
Detected mutations:
1 :+ return a + b; RegExp: pattern=-([^=]) flags=mId: builtin.arith.sub
10 } 11 for (var i = 0; i < 10; ++i) {} 12 var i = 0; 13 while (i < 10) { 14 ++i; 15 }
Undetected mutations:
1 :+ return a * b - c; RegExp: pattern=\+([^=]) flags=mId: builtin.arith.add
Detected mutations:
1 :+ return a / b + c; RegExp: pattern=\*([^=]) flags=mId: builtin.arith.mul
17 } 18 19 double poly(double x, double a, double b, double c) {
Detected mutations:
1 :+ return a * x * x - b * x + c; RegExp: pattern=\+([^=]) flags=mId: builtin.arith.add

2 :+ return a * x * x + b * x - c; RegExp: pattern=\+([^=]) flags=mId: builtin.arith.add

3 :+ return a / x * x + b * x + c; RegExp: pattern=\*([^=]) flags=mId: builtin.arith.mul

4 :+ return a * x / x + b * x + c; RegExp: pattern=\*([^=]) flags=mId: builtin.arith.mul

5 :+ return a * x * x + b / x + c; RegExp: pattern=\*([^=]) flags=mId: builtin.arith.mul
21 } 22 23 double inner2(double x, double y, double z) {
Undetected mutations:
1 :+ return poly( y,x, z, 2.0); RegExp: pattern=([\s][a-zA-Z]+?[^\(;\s{}]*?)\s*\(([^,:;{}(]+?),([^,:;{}(]+?),([^,:;{}(]+?),([^,:;{}(]+?)\)\s*; flags=mId: builtin.function.arg4

2 :+ return poly(x, z, y, 2.0); RegExp: pattern=([\s][a-zA-Z]+?[^\(;\s{}]*?)\s*\(([^,:;{}(]+?),([^,:;{}(]+?),([^,:;{}(]+?),([^,:;{}(]+?)\)\s*; flags=mId: builtin.function.arg4

3 :+ return poly(x, y, 2.0, z); RegExp: pattern=([\s][a-zA-Z]+?[^\(;\s{}]*?)\s*\(([^,:;{}(]+?),([^,:;{}(]+?),([^,:;{}(]+?),([^,:;{}(]+?)\)\s*; flags=mId: builtin.function.arg4
Detected mutations:
1 :+ return poly(x, y, z, -2.0); RegExp: pattern=([\s=\(])([1-9\.]+[0-9]+|0\.0*[1-9]) flags=mId: builtin.number.negative
25 } 26 27 double inner(double x, double y) {
Undetected mutations:
1 :+ return inner2( y,x, 1.0); RegExp: pattern=([\s][a-zA-Z]+?[^\(;\s{}]*?)\s*\(([^,:;{}(]+?),([^,:;{}(]+?),([^,:;{}(]+?)\)\s*; flags=mId: builtin.function.arg3

2 :+ return inner2(x, 1.0, y); RegExp: pattern=([\s][a-zA-Z]+?[^\(;\s{}]*?)\s*\(([^,:;{}(]+?),([^,:;{}(]+?),([^,:;{}(]+?)\)\s*; flags=mId: builtin.function.arg3
Detected mutations:
1 :+ return inner2(x, y, -1.0); RegExp: pattern=([\s=\(])([1-9\.]+[0-9]+|0\.0*[1-9]) flags=mId: builtin.number.negative
29 } 30 31 double outer(double x, double y) { 32 return optional(x: x, y: y); 33 } 34
Undetected mutations:
1 :+ double optional({double x = -1.0, double y = 2.0}) => inner(x, y); RegExp: pattern=([\s=\(])([1-9\.]+[0-9]+|0\.0*[1-9]) flags=mId: builtin.number.negative

2 :+ double optional({double x = 1.0, double y = -2.0}) => inner(x, y); RegExp: pattern=([\s=\(])([1-9\.]+[0-9]+|0\.0*[1-9]) flags=mId: builtin.number.negative

3 :+ double optional({double x = 1.0, double y = 2.0}) => inner( y,x); RegExp: pattern=([\s][a-zA-Z]+?[^(;\s{}]*?)\s*\(([^,:;{}(]+?),([^,:;{}(]+?)\)\s*; flags=mId: builtin.function.arg2
36 37 double polyNotCovered(double x, double a, double b, double c) {
Mutations not covered by tests:
1 :+ return a * x * x - b * x + c; RegExp: pattern=\+([^=]) flags=mId: builtin.arith.add

2 :+ return a * x * x + b * x - c; RegExp: pattern=\+([^=]) flags=mId: builtin.arith.add

3 :+ return a / x * x + b * x + c; RegExp: pattern=\*([^=]) flags=mId: builtin.arith.mul

4 :+ return a * x / x + b * x + c; RegExp: pattern=\*([^=]) flags=mId: builtin.arith.mul

5 :+ return a * x * x + b / x + c; RegExp: pattern=\*([^=]) flags=mId: builtin.arith.mul
39 } 40