in BoostTestAdapter/Boost/Results/BoostXmlReport.cs [152:173]
private static TestResult Aggregate(TestResult lhs, TestResult rhs)
{
// If lhs and rhs are incompatible, return the first non-null argument
if ((lhs == null) || (rhs == null) || (lhs.Collection != rhs.Collection) || (lhs.Unit.FullyQualifiedName != rhs.Unit.FullyQualifiedName))
{
return ((lhs != null) ? lhs : rhs);
}
TestResult rvalue = new TestResult(lhs.Collection);
rvalue.Unit = lhs.Unit;
// Select the worst of the result types
int result = Math.Max((int) lhs.Result, (int) rhs.Result);
rvalue.Result = (TestResultType) result;
// Sum up totals
rvalue.AssertionsPassed = lhs.AssertionsPassed + rhs.AssertionsPassed;
rvalue.AssertionsFailed = lhs.AssertionsFailed + rhs.AssertionsFailed;
rvalue.ExpectedFailures = lhs.ExpectedFailures + rhs.ExpectedFailures;
return rvalue;
}