Skip to content

Commit

Permalink
Fix compilation of Shipping targets
Browse files Browse the repository at this point in the history
  • Loading branch information
slonopotamus committed Aug 5, 2024
1 parent ff6832a commit 5334e76
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 16 deletions.
25 changes: 19 additions & 6 deletions Source/UEST/Public/UEST.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
#pragma once

#if WITH_UNREAL_DEVELOPER_TOOLS
#include "Assert/CQTestConvert.h"
#endif

#include "Misc/AutomationTest.h"

namespace UEST
{
template<typename T>
static FString ToString(const T& Value)
{
#if WITH_UNREAL_DEVELOPER_TOOLS
return CQTestConvert::ToString(Value);
#else
return TEXT("UNKNOWN");
#endif
}

template<typename T>
// TODO: Make this FNoncopyable?
struct IMatcher
Expand Down Expand Up @@ -130,7 +143,7 @@ namespace UEST

virtual FString Describe() const override
{
return FString::Printf(TEXT("be equal to %s"), *CQTestConvert::ToString(Expected));
return FString::Printf(TEXT("be equal to %s"), *ToString(Expected));
}
};

Expand All @@ -152,7 +165,7 @@ namespace UEST

virtual FString Describe() const override
{
return FString::Printf(TEXT("be less than %s"), *CQTestConvert::ToString(Expected));
return FString::Printf(TEXT("be less than %s"), *ToString(Expected));
}
};

Expand All @@ -174,7 +187,7 @@ namespace UEST

virtual FString Describe() const override
{
return FString::Printf(TEXT("be less than or equal to %s"), *CQTestConvert::ToString(Expected));
return FString::Printf(TEXT("be less than or equal to %s"), *ToString(Expected));
}
};

Expand All @@ -196,7 +209,7 @@ namespace UEST

virtual FString Describe() const override
{
return FString::Printf(TEXT("be greater than %s"), *CQTestConvert::ToString(Expected));
return FString::Printf(TEXT("be greater than %s"), *ToString(Expected));
}
};

Expand All @@ -218,7 +231,7 @@ namespace UEST

virtual FString Describe() const override
{
return FString::Printf(TEXT("be greater than or equal to %s"), *CQTestConvert::ToString(Expected));
return FString::Printf(TEXT("be greater than or equal to %s"), *ToString(Expected));
}
};

Expand Down Expand Up @@ -247,7 +260,7 @@ namespace UEST

virtual FString Describe() const override
{
return FString::Printf(TEXT("be in range from %s to %s"), *CQTestConvert::ToString(From), *CQTestConvert::ToString(To));
return FString::Printf(TEXT("be in range from %s to %s"), *ToString(From), *ToString(To));
}
};

Expand Down
25 changes: 15 additions & 10 deletions Source/UEST/UEST.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,22 @@ public class UEST : ModuleRules
{
public UEST(ReadOnlyTargetRules Target) : base(Target)
{
PublicDependencyModuleNames.AddRange(
new[]
PublicDependencyModuleNames.AddRange(new[]
{
"Boost",
"Core",
"CoreUObject",
"Engine",
"EngineSettings",
"IrisCore",
});

if (Target.bBuildDeveloperTools)
{
PublicDependencyModuleNames.AddRange(new[]
{
"Boost",
"Core",
"CoreUObject",
"CQTest",
"Engine",
"EngineSettings",
"IrisCore",
}
);
});
}
}
}

0 comments on commit 5334e76

Please sign in to comment.