diff --git a/DaedalicTestAutomationPlugin/Source/DaedalicTestAutomationPlugin/Private/DaeTestReportWriterPerformance.cpp b/DaedalicTestAutomationPlugin/Source/DaedalicTestAutomationPlugin/Private/DaeTestReportWriterPerformance.cpp index 61caaae..3ead421 100644 --- a/DaedalicTestAutomationPlugin/Source/DaedalicTestAutomationPlugin/Private/DaeTestReportWriterPerformance.cpp +++ b/DaedalicTestAutomationPlugin/Source/DaedalicTestAutomationPlugin/Private/DaeTestReportWriterPerformance.cpp @@ -65,8 +65,9 @@ void FDaeTestReportWriterPerformance::WriteReport(const TArray 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}"), @@ -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)); +} diff --git a/DaedalicTestAutomationPlugin/Source/DaedalicTestAutomationPlugin/Public/DaeTestReportWriterPerformance.h b/DaedalicTestAutomationPlugin/Source/DaedalicTestAutomationPlugin/Public/DaeTestReportWriterPerformance.h index bc916a6..4560bc2 100644 --- a/DaedalicTestAutomationPlugin/Source/DaedalicTestAutomationPlugin/Public/DaeTestReportWriterPerformance.h +++ b/DaedalicTestAutomationPlugin/Source/DaedalicTestAutomationPlugin/Public/DaeTestReportWriterPerformance.h @@ -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; };