Mutation test report

Current display: example/source2.dart - back to top Detected Total Percentage
Date: 2024-09-01 19:47:54.791118 Mutations: 2 56 3.6 %
Builtin rules: true Blocked: 32 56 57.1 %

          Source code
       1 // Copyright 2021, domohuhn.
       2 // License: BSD-3-Clause
       3 // See LICENSE for the full text of the license
       4 
       5 /* a multi line
       6  * comment
       7  */
       8 class TestData {
       9   String text = 'default';

Undetected mutations:
1 :+ double number1 = -25.0; RegExp: pattern=([\s=\(])([1-9\.]+[0-9]+|0\.0*[1-9]) flags=mId: builtin.number.negative
Undetected mutations:
1 :+ double number2 = -25.0; RegExp: pattern=([\s=\(])([1-9\.]+[0-9]+|0\.0*[1-9]) flags=mId: builtin.number.negative
12 bool on = false; 13 14 double calc(double x) {
Undetected mutations:
1 :+ return number1 * x * number2; RegExp: pattern=/([^=]) flags=mId: builtin.arith.div
Detected mutations:
1 :+ return number1 / x / number2; RegExp: pattern=\*([^=]) flags=mId: builtin.arith.mul
16 } 17 18 // just a weird example ... 19 String format(double y) {
Undetected mutations:
1 :+ if (y <= 0.0 || text != '') { &&Id: builtin.and

2 :+ if (y <= 0.0 && text == '') { !=Id: builtin.op.neq

3 :+ if (y == 0.0 && text != '') { <=Id: builtin.op.leq

4 :+ if (y < 0.0 && text != '') { <=Id: builtin.op.leq

5 :+ if (!(y <= 0.0 && text != '')) { RegExp: pattern=[\s]if[\s]*\((.*?)\)[\s]*{ flags=msId: builtin.if

6 :+ if (!(y <= 0.0 )&& text != '') { RegExp: pattern=\(([^$(]*?)&&([^$()]*?)\) flags=mId: builtin.logical.and_chain2

7 :+ if (y <= 0.0 &&!( text != '')) { RegExp: pattern=\(([^$(]*?)&&([^$()]*?)\) flags=mId: builtin.logical.and_chain2

8 :+ if (!(y <= 0.0 )&& text != '') { RegExp: pattern=if\s*\(([^|&\)]*?)([|&][|&]) flags=mId: builtin.if.start

9 :+ if (y <= 0.0 &&!( text != '')) { RegExp: pattern=([|&][|&])([^|&]*?)\) flags=mId: builtin.if.end
21 return '$text $y';
Undetected mutations:
1 :+ } else if (y == 0.0 || text != '') { &&Id: builtin.and

2 :+ } else if (y != 0.0 && text != '') { ==Id: builtin.op.eq

3 :+ } else if (y == 0.0 && text == '') { !=Id: builtin.op.neq

4 :+ } else if (!(y == 0.0 && text != '')) { RegExp: pattern=[\s]if[\s]*\((.*?)\)[\s]*{ flags=msId: builtin.if

5 :+ } else if (!(y == 0.0 )&& text != '') { RegExp: pattern=\(([^$(]*?)&&([^$()]*?)\) flags=mId: builtin.logical.and_chain2

6 :+ } else if (y == 0.0 &&!( text != '')) { RegExp: pattern=\(([^$(]*?)&&([^$()]*?)\) flags=mId: builtin.logical.and_chain2

7 :+ } else if (!(y == 0.0 )&& text != '') { RegExp: pattern=if\s*\(([^|&\)]*?)([|&][|&]) flags=mId: builtin.if.start

8 :+ } else if (y == 0.0 &&!( text != '')) { RegExp: pattern=([|&][|&])([^|&]*?)\) flags=mId: builtin.if.end
23 return '$text $y'; 24 } 25 return 'default $y'; 26 } 27 28 void changeState(dynamic event) {
Mutations not covered by tests:
1 :+ if (event.a || &&Id: builtin.and

2 :+ if (!(event.a && event.b && (event.c || event.d || (event.f && event.g)) && event.e)) { RegExp: pattern=[\s]if[\s]*\((.*?)\)[\s]*{ flags=msId: builtin.if

3 :+ if (event.a &&!( event.b )&& RegExp: pattern=&([^&()]+?)& flags=msId: builtin.logical.and_chain

4 :+ if (!(event.a )&& RegExp: pattern=if\s*\(([^|&\)]*?)([|&][|&]) flags=mId: builtin.if.start
Mutations not covered by tests:
1 :+ event.b || &&Id: builtin.and

2 :+ event.b &&!(event.c || event.d || (event.f && event.g)) && RegExp: pattern=([|&][|&])[\s]*?\( flags=msId: builtin.logical.chain_not
Mutations not covered by tests:
1 :+ (event.c || event.d || (event.f || event.g)) && &&Id: builtin.and

2 :+ (event.c || event.d || (event.f && event.g)) || &&Id: builtin.and

3 :+ (event.c && event.d || (event.f && event.g)) && ||Id: builtin.or

4 :+ (event.c || event.d && (event.f && event.g)) && ||Id: builtin.or

5 :+ (event.c ||!( event.d )|| (event.f && event.g)) && RegExp: pattern=\|([^|()]+?)\| flags=msId: builtin.logical.or_chain

6 :+ (event.c || event.d || (!(event.f )&& event.g)) && RegExp: pattern=\(([^$(]*?)&&([^$()]*?)\) flags=mId: builtin.logical.and_chain2

7 :+ (event.c || event.d || (event.f &&!( event.g))) && RegExp: pattern=\(([^$(]*?)&&([^$()]*?)\) flags=mId: builtin.logical.and_chain2

8 :+ (event.c || event.d || (event.f &&!( event.g))) && RegExp: pattern=([|&][|&])([^|&]*?)\) flags=mId: builtin.if.end

9 :+ (event.c || event.d || (event.f && event.g)) &&!( event.e)) { RegExp: pattern=([|&][|&])([^|&]*?)\) flags=mId: builtin.if.end

10 :+ (event.c || event.d ||!(event.f && event.g)) && RegExp: pattern=([|&][|&])[\s]*?\( flags=msId: builtin.logical.chain_not
32 event.e) { 33 on = true; 34 } 35 } 36 37 // excluded: 38 void changeState2(dynamic event) {
Mutations not covered by tests:
1 :+ if (event.a || &&Id: builtin.and

2 :+ if (!(event.a && event.b && (event.c || event.d || (event.f && event.g)) && event.e)) { RegExp: pattern=[\s]if[\s]*\((.*?)\)[\s]*{ flags=msId: builtin.if

3 :+ if (event.a &&!( event.b )&& RegExp: pattern=&([^&()]+?)& flags=msId: builtin.logical.and_chain

4 :+ if (!(event.a )&& RegExp: pattern=if\s*\(([^|&\)]*?)([|&][|&]) flags=mId: builtin.if.start
Mutations not covered by tests:
1 :+ event.b || &&Id: builtin.and

2 :+ event.b &&!(event.c || event.d || (event.f && event.g)) && RegExp: pattern=([|&][|&])[\s]*?\( flags=msId: builtin.logical.chain_not
Mutations not covered by tests:
1 :+ (event.c || event.d || (event.f || event.g)) && &&Id: builtin.and

2 :+ (event.c || event.d || (event.f && event.g)) || &&Id: builtin.and

3 :+ (event.c && event.d || (event.f && event.g)) && ||Id: builtin.or

4 :+ (event.c || event.d && (event.f && event.g)) && ||Id: builtin.or

5 :+ (event.c ||!( event.d )|| (event.f && event.g)) && RegExp: pattern=\|([^|()]+?)\| flags=msId: builtin.logical.or_chain

6 :+ (event.c || event.d || (!(event.f )&& event.g)) && RegExp: pattern=\(([^$(]*?)&&([^$()]*?)\) flags=mId: builtin.logical.and_chain2

7 :+ (event.c || event.d || (event.f &&!( event.g))) && RegExp: pattern=\(([^$(]*?)&&([^$()]*?)\) flags=mId: builtin.logical.and_chain2

8 :+ (event.c || event.d || (event.f &&!( event.g))) && RegExp: pattern=([|&][|&])([^|&]*?)\) flags=mId: builtin.if.end

9 :+ (event.c || event.d || (event.f && event.g)) &&!( event.e)) { RegExp: pattern=([|&][|&])([^|&]*?)\) flags=mId: builtin.if.end

10 :+ (event.c || event.d ||!(event.f && event.g)) && RegExp: pattern=([|&][|&])[\s]*?\( flags=msId: builtin.logical.chain_not
42 event.e) { 43 on = true; 44 } 45 } 46 47 List<double> values = []; 48 void fillList(double x) {
Detected mutations:
1 :+ values = []; RegExp: pattern=([=:>]\s*)\[([^\],]+),([^\]]+)\] flags=mId: builtin.list.clear
50 } 51
Undetected mutations:
1 :+ double voidCalls(double x) { RegExp: pattern=([{]\s*)([^\(;=\s}]+\([^;]+\)\s*;) flags=mId: builtin.function.removeVoidCall1
Undetected mutations:
1 :+ fillList(x); RegExp: pattern=([};]\s*)([^\(;=\s}]+\([^;]+\)\s*;) flags=mId: builtin.function.removeVoidCall2
54 format(x); 55 return x; 56 } 57 } 58