Skip to content

Commit

Permalink
Remove fractional digits from locations in performance test reports.
Browse files Browse the repository at this point in the history
  • Loading branch information
npruehs committed Jul 8, 2020
1 parent 726457c commit f306a5a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@ void FDaeTestReportWriterPerformance::WriteReport(const TArray<FDaeTestSuiteResu
// Write budget violation.
TMap<FString, FString> BudgetViolationTemplateReplacements;

BudgetViolationTemplateReplacements.Add(
TEXT("{LOCATION}"), BudgetViolation.CurrentLocation.ToString());
BudgetViolationTemplateReplacements.Add(TEXT("{LOCATION}"),
FormatLocation(
BudgetViolation.CurrentLocation));
BudgetViolationTemplateReplacements.Add(
TEXT("{PREVIOUS}"), BudgetViolation.PreviousTargetPointName);
BudgetViolationTemplateReplacements.Add(TEXT("{NEXT}"),
Expand Down Expand Up @@ -138,3 +139,9 @@ FString FDaeTestReportWriterPerformance::FormatTime(float Time) const
324, 2, 2)
.ToString();
}

FString FDaeTestReportWriterPerformance::FormatLocation(const FVector& Location) const
{
return FString::Printf(TEXT("X=%d Y=%d Z=%d"), FMath::FloorToInt(Location.X),
FMath::FloorToInt(Location.Y), FMath::FloorToInt(Location.Z));
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,7 @@ class DAEDALICTESTAUTOMATIONPLUGIN_API FDaeTestReportWriterPerformance : public
private:
/** Formats the specified time using a fixed number of fractional digits. */
FString FormatTime(float Time) const;

/** Formats the specified location using a fixed number of fractional digits. */
FString FormatLocation(const FVector& Location) const;
};

0 comments on commit f306a5a

Please sign in to comment.