fluentasserts.core.operations.equal 8/20(40%) line coverage

      
10
20
30
40
50
60
70
80
90
100
110
120
130
140
150
16437
170
18437
190
20441
212
220
230
24437
252
260
270
28437
29437
300
310
320
330
340
350
360
370
380
390
400
410
420
430
440
450
460
470
480
490
500
510
520
530
module fluentasserts.core.operations.equal; import fluentasserts.core.results; import fluentasserts.core.evaluation; import fluentasserts.core.lifecycle; version(unittest) { import fluentasserts.core.expect; } static immutable equalDescription = "Asserts that the target is strictly == equal to the given val."; /// IResult[] equal(ref Evaluation evaluation) @safe nothrow { evaluation.message.addText("."); bool result = evaluation.currentValue.strValue == evaluation.expectedValue.strValue; if(!result && evaluation.currentValue.proxyValue !is null && evaluation.expectedValue.proxyValue !is null) { result = evaluation.currentValue.proxyValue.isEqualTo(evaluation.expectedValue.proxyValue); } 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; }