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

      
10
20
30
40
50
60
70
80
90
100
110
120
130
141574
150
161574
170
181574
1954
200
210
221574
231514
240
250
2660
270
2860
2956
3056
310
3256
3323
340
3533
360
370
3856
3956
400
4156
420
430
44120
450
4660
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 { evaluation.message.addText("."); auto result = evaluation.currentValue.strValue == evaluation.expectedValue.strValue; if(evaluation.isNegated) { result = !result; } if(result) { return []; } IResult[] results = []; if(evaluation.currentValue.typeName != "bool") { evaluation.message.addText(" "); evaluation.message.addValue(evaluation.currentValue.strValue); if(evaluation.isNegated) { evaluation.message.addText(" is equal to "); } else { evaluation.message.addText(" is not equal to "); } evaluation.message.addValue(evaluation.expectedValue.strValue); evaluation.message.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; }