fluentasserts.core.operations.equal 18/18(100%) line coverage

      
10
20
30
40
50
60
70
80
90
100
110
120
130
141301
150
161301
170
181301
1950
200
210
221301
231247
240
250
2654
270
2854
2950
3050
310
3250
3322
340
3528
360
370
3850
3950
400
4150
420
430
44108
450
4654
470
module fluentasserts.core.operations.equal; import fluentasserts.core.results; import fluentasserts.core.evaluation; import fluentasserts.core.lifecycle; version(unittest) { import fluentasserts.core.expect; } /// IResult[] equal(ref Evaluation evaluation) @safe nothrow { Lifecycle.instance.addText("."); auto result = evaluation.currentValue.strValue == evaluation.expectedValue.strValue; if(evaluation.isNegated) { result = !result; } if(result) { return []; } IResult[] results = []; if(evaluation.currentValue.typeName != "bool") { Lifecycle.instance.addText(" "); Lifecycle.instance.addValue(evaluation.currentValue.strValue); if(evaluation.isNegated) { Lifecycle.instance.addText(" is equal to "); } else { Lifecycle.instance.addText(" is not equal to "); } Lifecycle.instance.addValue(evaluation.expectedValue.strValue); Lifecycle.instance.addText("."); try results ~= new DiffResult(evaluation.expectedValue.strValue, evaluation.currentValue.strValue); catch(Exception) {} } try results ~= new ExpectedActualResult((evaluation.isNegated ? "not " : "") ~ evaluation.expectedValue.strValue, evaluation.currentValue.strValue); catch(Exception) {} return results; }